mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 20:20:12 +01:00
fix logging the descriptor for smtp chat
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
97830bc265
commit
f9a0dee5c4
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user