From: Vsevolod Stakhov Date: Thu, 9 Sep 2010 16:36:27 +0000 (+0400) Subject: * Write user's name to rspamd log X-Git-Tag: 0.3.2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94ce619f8a598ea1532c8e63137f74157ac5c9ed;p=thirdparty%2Frspamd.git * Write user's name to rspamd log --- diff --git a/src/protocol.c b/src/protocol.c index cece0bab70..934dabe053 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -831,6 +831,10 @@ write_check_reply (struct worker_task *task) cd.log_buf = logbuf; cd.log_offset = rspamd_snprintf (logbuf, sizeof (logbuf), "id: <%s>, qid: <%s>, ", task->message_id, task->queue_id); cd.log_size = sizeof (logbuf); + if (task->user) { + cd.log_offset += rspamd_snprintf (logbuf + cd.log_offset, sizeof (logbuf) - cd.log_offset, + "user: %s, ", task->user); + } cd.alive = TRUE; if (task->proto == SPAMC_PROTO) { @@ -919,6 +923,10 @@ write_process_reply (struct worker_task *task) cd.task = task; cd.log_buf = logbuf; cd.log_offset = rspamd_snprintf (logbuf, sizeof (logbuf), "id: <%s>, qid: <%s>, ", task->message_id, task->queue_id); + if (task->user) { + cd.log_offset += rspamd_snprintf (logbuf + cd.log_offset, sizeof (logbuf) - cd.log_offset, + "user: %s, ", task->user); + } cd.log_size = sizeof (logbuf); cd.alive = TRUE;