From: Timo Sirainen Date: Fri, 31 Aug 2018 11:57:13 +0000 (+0300) Subject: log: Move data stack frame allocation to parent function X-Git-Tag: 2.3.9~1469 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4e573cb8f6289b5868f6e0f537aa0ab8d0a33e46;p=thirdparty%2Fdovecot%2Fcore.git log: Move data stack frame allocation to parent function This simplifies the next commit, which requires data stack nearly always when logging. The data stack frames are cheap enough that we don't really need to optimize for avoiding the cases when they're not needed. --- diff --git a/src/log/log-connection.c b/src/log/log-connection.c index 8677043478..fa460e5a27 100644 --- a/src/log/log-connection.c +++ b/src/log/log-connection.c @@ -246,9 +246,7 @@ log_it(struct log_connection *log, const char *line, const char *prefix; if (log->master) { - T_BEGIN { - log_parse_master_line(line, log_time, tm); - } T_END; + log_parse_master_line(line, log_time, tm); return; } @@ -360,8 +358,9 @@ static void log_connection_input(struct log_connection *log) now = ioloop_timeval; tm = *localtime(&now.tv_sec); - while ((line = i_stream_next_line(log->input)) != NULL) + while ((line = i_stream_next_line(log->input)) != NULL) T_BEGIN { log_it(log, line, &now, &tm); + } T_END; io_loop_time_refresh(); if (timeval_diff_msecs(&ioloop_timeval, &start_timeval) > MAX_MSECS_PER_CONNECTION) { too_much = TRUE;