fix logging the descriptor for smtp chat

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2018-05-13 14:47:47 +02:00
parent 97830bc265
commit f9a0dee5c4

View File

@ -18,7 +18,7 @@
void process_smtp_command(struct smtp_session *session, char *buf, struct config *cfg){ void process_smtp_command(struct smtp_session *session, char *buf, struct config *cfg){
char response[SMALLBUFSIZE]; 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){ if(strncasecmp(buf, SMTP_CMD_HELO, strlen(SMTP_CMD_HELO)) == 0){
process_command_helo(session, response, sizeof(response)); 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){ void send_smtp_response(struct smtp_session *session, char *buf){
write1(&(session->net), buf, strlen(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);
} }