Mercurial > dnsbl
changeset 318:e2dc882839f6 stable-6-0-47
better smtp verify logging
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 22 Sep 2016 08:43:02 -0700 |
parents | a20c59b88049 |
children | 0ed4de7ce05b |
files | src/context.cpp |
diffstat | 1 files changed, 4 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/context.cpp Wed Sep 21 16:51:01 2016 -0700 +++ b/src/context.cpp Thu Sep 22 08:43:02 2016 -0700 @@ -316,9 +316,7 @@ else { conn->set_id(queueid); connections.pop_front(); - #ifdef VERIFY_DEBUG conn->log("verify::get_connection(%d) from cache %s", ""); - #endif break; } } @@ -327,8 +325,8 @@ int rc = conn->rset(); conn->log("verify::getconnection(%d) rset sees %d", rc); if (rc == 250) return conn; - put_connection(conn); - return NULL; + delete conn; + // old connection from cache was unusable, fall thru and make a new one } int sock = NULL_SOCKET; if ((time(NULL) - last_err) > ERROR_SMTP_SOCKET_TIME) { @@ -361,9 +359,7 @@ setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, (char *)&tv, sizeof(struct timeval)); conn = new SMTP(sock); conn->set_id(queueid); - #ifdef VERIFY_DEBUG conn->log("get_connection(%d) new socket %s", ""); - #endif int rc = conn->helo(); conn->log("verify::get_connection(%d) helo sees %d", rc); if (rc == 250) return conn;