aboutsummaryrefslogtreecommitdiffstats
path: root/smtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'smtp.c')
-rw-r--r--smtp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/smtp.c b/smtp.c
index 1c99c696..90c35173 100644
--- a/smtp.c
+++ b/smtp.c
@@ -313,10 +313,12 @@ int SMTP_ok(int sock, char smtp_mode, int mintimeout)
{
SIGHANDLERTYPE alrmsave;
char reply[MSGBUFSIZE], *i;
+ int tmo = (mytimeout >= mintimeout) ? mytimeout : mintimeout;
/* set an alarm for smtp ok */
alrmsave = set_signal_handler(SIGALRM, null_signal_handler);
- set_timeout(mytimeout >= mintimeout ? mytimeout : mintimeout);
+ set_timeout(tmo);
+ SockTimeout(sock, tmo);
smtp_response[0] = '\0';