Repository: incubator-hawq
Updated Branches:
  refs/heads/master 2989326b0 -> c92107f7f


HAWQ-767. make hawq code work with upstream libesmtp


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/c92107f7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/c92107f7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/c92107f7

Branch: refs/heads/master
Commit: c92107f7fcafa2aff10a1e4443380dee31bb985b
Parents: 2989326
Author: Paul Guo <[email protected]>
Authored: Tue May 31 09:20:53 2016 +0800
Committer: yaoj2 <[email protected]>
Committed: Tue May 31 10:17:02 2016 +0800

----------------------------------------------------------------------
 src/backend/postmaster/sendalert.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/c92107f7/src/backend/postmaster/sendalert.c
----------------------------------------------------------------------
diff --git a/src/backend/postmaster/sendalert.c 
b/src/backend/postmaster/sendalert.c
index 7492caf..3568bdb 100644
--- a/src/backend/postmaster/sendalert.c
+++ b/src/backend/postmaster/sendalert.c
@@ -815,14 +815,12 @@ static int send_alert_via_email(const GpErrorData * 
errorData,
        /* smtp_8bitmime_set_body(message, E8bitmime_8BITMIME); */
 
        /* Initiate a connection to the SMTP server and transfer the message. */
-        int num_smtp_failures = 0;
-        int smtp_ret = smtp_start_session_with_timeout(session, 
gp_email_connect_timeout, &num_smtp_failures, NULL, 0); 
-       if (smtp_ret <= 0)
+       int smtp_ret = smtp_start_session(session);
+       if (smtp_ret == 0)
        {
-                 if (num_smtp_failures > 0) { /* SMTP server issue */
-                     num_connect_failures++;
-                     last_connect_failure_ts = time(0);  
-                 }
+               num_connect_failures++;
+               last_connect_failure_ts = time(0);  
+
                /*
                 * If we get here, we can't talk to the SMTP server at all
                 */

Reply via email to