dovecot-2.0: Logging lines longer than PIPE_BUF caused an extra ...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Jun 11 17:17:35 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/5ede18fe35fa
changeset: 11518:5ede18fe35fa
user: Timo Sirainen <tss at iki.fi>
date: Fri Jun 11 15:17:31 2010 +0100
description:
Logging lines longer than PIPE_BUF caused an extra empty line to be logged.
diffstat:
src/lib/failures.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (19 lines):
diff -r 3fa10300c70c -r 5ede18fe35fa src/lib/failures.c
--- a/src/lib/failures.c Wed Jun 09 21:09:34 2010 +0100
+++ b/src/lib/failures.c Fri Jun 11 15:17:31 2010 +0100
@@ -526,11 +526,12 @@
prefix_len = str_len(str);
str_vprintfa(str, format, args);
- str_append_c(str, '\n');
- if (str_len(str) <= PIPE_BUF)
+ if (str_len(str)+1 <= PIPE_BUF) {
+ str_append_c(str, '\n');
ret = log_fd_write(2, str_data(str), str_len(str));
- else
+ } else {
ret = internal_send_split(str, prefix_len);
+ }
} T_END;
if (ret < 0 && failure_ignore_errors)
More information about the dovecot-cvs
mailing list