Skip to content

Commit

Permalink
Logger: Append newlines to messages in error log files
Browse files Browse the repository at this point in the history
Since 493e8f5 (Consistently use no LF in ERROR() calls) there are no
newlines in the messages, so they should be appended centrally.

Fixes SIPp#722.
  • Loading branch information
orgads committed Apr 20, 2024
1 parent 3d27781 commit b7ed83e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ static void _screen_error(int fatal, bool use_errno, int error, const char *fmt,
}

if (error_lfi.fptr) {
count += fprintf(error_lfi.fptr, "%s", screen_last_error);
count += fprintf(error_lfi.fptr, "%s\n", screen_last_error);
fflush(error_lfi.fptr);
if (ringbuffer_size && count > ringbuffer_size) {
rotate_errorf();
Expand Down

1 comment on commit b7ed83e

@mstovenour
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is working here. Thanks!

Now to fix those errors its spitting out :( [next_url] is getting garbage when the contact header is not in the sip message with rrs="true". Looking at all the code paths I don't see an obvious place where next_req_url is being set to anything other than NULL.

Please sign in to comment.