# HG changeset patch # User Carl Byington # Date 1474558982 25200 # Node ID e2dc882839f6c83cac758eae743b4f9b118c1106 # Parent a20c59b88049c005c2d2a9125f8d839ce2769553 better smtp verify logging diff -r a20c59b88049 -r e2dc882839f6 src/context.cpp --- 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;