Skip to content

Commit

Permalink
log: Move data stack frame allocation to parent function
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sirainen authored and villesavolainen committed Sep 7, 2018
1 parent 8019654 commit 5fc5933
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/log/log-connection.c
Expand Up @@ -245,9 +245,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;
}

Expand Down Expand Up @@ -359,8 +357,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;
Expand Down

0 comments on commit 5fc5933

Please sign in to comment.