)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"faf1acd1d520e68e85933c2a456ab2f69d836be8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"70b653da_0126bd25","updated":"2023-09-18 12:51:01.000000000","message":"The purpose of this change is to make sure we won\u0027t lose command output if a log print (e.g. LOG_INFO) happens in the process.\n\nThis change ensures consistent output of `capture { my_command }`: If a log print happens, we obtain it but don\u0027t lose the command output because of that.","commit_id":"645fe0470b015181bd2b271a687429f34fc11777"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"688c0780b3c7d45608a37b2dcbcd3d384aa36bed","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"cb59408a_ee9a118e","updated":"2023-10-06 11:00:27.000000000","message":"LGTM, thank you.","commit_id":"b61d00059798b728e68b82ec9ad9231a56f0db48"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"7540306a3a2b11d5b1c2bbaf8b45f28ff4022021","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"3426401e_a24d0dd2","updated":"2023-10-07 17:05:12.000000000","message":"Thanks","commit_id":"b61d00059798b728e68b82ec9ad9231a56f0db48"}],"src/helper/command.c":[{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"118b9d36ee4e8971b9a96df12264aa643794aef5","unresolved":true,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"\t// Just in case the log doesn\u0027t end with a newline, we add it"},{"line_number":115,"context_line":"\tif (loglen !\u003d 0 \u0026\u0026 log_result[loglen - 1] !\u003d \u0027\\n\u0027)"},{"line_number":116,"context_line":"\t\tJim_AppendString(state-\u003einterp, state-\u003eoutput, \"\\n\", 1);"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"\tint reslen;"},{"line_number":119,"context_line":"\tconst char *cmd_result \u003d Jim_GetString(Jim_GetResult(state-\u003einterp), \u0026reslen);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"5799ee08_4d420dbb","line":116,"updated":"2023-10-05 18:40:56.000000000","message":"What if the second part is empty (reslen \u003d\u003d 0), do we still need to append the newline?\n\nPlease, could you compare it with the original behavior - whether the trailing newline should be there or not.\n\nThank you.","commit_id":"645fe0470b015181bd2b271a687429f34fc11777"},{"author":{"_account_id":1002143,"name":"Marek Vrbka","email":"marek.vrbka@codasip.com","username":"MarekVCodasip"},"change_message_id":"5a66e296dacfb97a0bf18c025182693955b1cf8b","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"\t// Just in case the log doesn\u0027t end with a newline, we add it"},{"line_number":115,"context_line":"\tif (loglen !\u003d 0 \u0026\u0026 log_result[loglen - 1] !\u003d \u0027\\n\u0027)"},{"line_number":116,"context_line":"\t\tJim_AppendString(state-\u003einterp, state-\u003eoutput, \"\\n\", 1);"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"\tint reslen;"},{"line_number":119,"context_line":"\tconst char *cmd_result \u003d Jim_GetString(Jim_GetResult(state-\u003einterp), \u0026reslen);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"e1916892_38d58de7","line":116,"in_reply_to":"5799ee08_4d420dbb","updated":"2023-10-06 08:36:21.000000000","message":"It actually does not mater in the end, there seems to be some kind of a mechanism which removes newlines before sending them.\n\nNonetheless, I have added a check if reslen is 0, then no newline will be appended.","commit_id":"645fe0470b015181bd2b271a687429f34fc11777"}]}
