MINOR: log: use __send_log() with exact payload length
Historically, __send_log() was called with terminating NULL byte after the message payload. But now that __send_log() supports being called without terminating NULL byte (thanks to size hint), and that __sendlog() actually stips any \n or NULL byte, we don't need to bother with that anymore. So let's remove extra logic around __send_log() users where we added 1 extra byte for the terminating NULL byte. No change of behavior should be expected.
This commit is contained in:
parent
94a9b0f5de
commit
9e9b110032
@ -5229,7 +5229,7 @@ void do_log(struct session *sess, struct stream *s, struct log_orig origin)
|
||||
ctx.sess = sess;
|
||||
ctx.stream = s;
|
||||
__send_log(&ctx, &sess->fe->loggers, &sess->fe->log_tag, level,
|
||||
logline, size + 1, logline_rfc5424, sd_size);
|
||||
logline, size, logline_rfc5424, sd_size);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5288,7 +5288,7 @@ void strm_log(struct stream *s, struct log_orig origin)
|
||||
ctx.sess = sess;
|
||||
ctx.stream = s;
|
||||
__send_log(&ctx, &sess->fe->loggers, &sess->fe->log_tag, level,
|
||||
logline, size + 1, logline_rfc5424, sd_size);
|
||||
logline, size, logline_rfc5424, sd_size);
|
||||
s->logs.logwait = 0;
|
||||
}
|
||||
}
|
||||
@ -5358,7 +5358,7 @@ void _sess_log(struct session *sess, int embryonic)
|
||||
ctx.stream = NULL;
|
||||
__send_log(&ctx, &sess->fe->loggers,
|
||||
&sess->fe->log_tag, level,
|
||||
logline, size + 1, logline_rfc5424, sd_size);
|
||||
logline, size, logline_rfc5424, sd_size);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user