From f9a0dee5c4026c2a9c8294eaee168ca7b3935587 Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Sun, 13 May 2018 14:47:47 +0200 Subject: [PATCH] fix logging the descriptor for smtp chat Signed-off-by: Janos SUTO --- src/smtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/smtp.c b/src/smtp.c index 5c4522ea..2f505535 100644 --- a/src/smtp.c +++ b/src/smtp.c @@ -18,7 +18,7 @@ void process_smtp_command(struct smtp_session *session, char *buf, struct config *cfg){ char response[SMALLBUFSIZE]; - if(session->cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "(fd: %d) processing command: *%s*", session->net.socket, buf); + if(session->cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "processing command (fd: %d): *%s*", session->net.socket, buf); if(strncasecmp(buf, SMTP_CMD_HELO, strlen(SMTP_CMD_HELO)) == 0){ process_command_helo(session, response, sizeof(response)); @@ -115,7 +115,7 @@ void wait_for_ssl_accept(struct smtp_session *session){ void send_smtp_response(struct smtp_session *session, char *buf){ write1(&(session->net), buf, strlen(buf)); - if(session->cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "sent: %s", buf); + if(session->cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "sent (fd: %d): %s", session->net.socket, buf); }