From: Timo Sirainen Date: Wed, 23 Oct 2013 13:23:23 +0000 (+0300) Subject: stats: Hide warnings about old autocreated sessions having gotten lost. X-Git-Tag: 2.2.7~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6de8a4d76cf113819a9b32536f048cceda187582;p=thirdparty%2Fdovecot%2Fcore.git stats: Hide warnings about old autocreated sessions having gotten lost. --- diff --git a/src/stats/mail-session.c b/src/stats/mail-session.c index 6de8637d8d..29e58b5101 100644 --- a/src/stats/mail-session.c +++ b/src/stats/mail-session.c @@ -48,10 +48,17 @@ static void mail_session_disconnect(struct mail_session *session) static void mail_session_idle_timeout(struct mail_session *session) { - i_warning("Session %s (user %s, service %s) appears to have crashed, " - "disconnecting it", - guid_128_to_string(session->guid), session->user->name, - session->service); + /* user="" service="" pid=0 is used for incoming sessions that were + received after we detected a stats process crash/restart. there's + no point in logging anything about them, since they contain no + useful information. */ + if (session->user->name[0] == '\0' && session->service[0] != '\0' && + session->pid == 0) { + i_warning("Session %s (user %s, service %s) " + "appears to have crashed, disconnecting it", + guid_128_to_string(session->guid), + session->user->name, session->service); + } mail_session_disconnect(session); }