aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-09-12 11:59:39 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-09-12 11:59:39 +0000
commitc64bc78c091837def7820299eb99ed51a21570d8 (patch)
tree11f97f7a8dfc7f910e62538f840040e233fa0ea3 /driver.c
parent3490078bdc134e2464dfb35711b6e08dfad7a8da (diff)
downloadfetchmail-c64bc78c091837def7820299eb99ed51a21570d8.tar.gz
fetchmail-c64bc78c091837def7820299eb99ed51a21570d8.tar.bz2
fetchmail-c64bc78c091837def7820299eb99ed51a21570d8.zip
Added port-specification option.
svn path=/trunk/; revision=87
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/driver.c b/driver.c
index 74c3d993..4718d35b 100644
--- a/driver.c
+++ b/driver.c
@@ -78,7 +78,7 @@ struct method *proto;
if ((mboxfd = openuserfolder(queryctl)) < 0)
return(PS_IOERR);
} else if (queryctl->output == TO_SMTP) {
- if ((mboxfd = Socket(queryctl->smtphost,SMTP_PORT)) < 0)
+ if ((mboxfd = Socket(queryctl->smtphost, SMTP_PORT)) < 0)
return(PS_SOCKET);
/* eat the greeting message */
@@ -97,7 +97,9 @@ struct method *proto;
}
/* open a socket to the mail server */
- if ((socket = Socket(queryctl->servername,protocol->port)) < 0) {
+ if ((socket = Socket(queryctl->servername,
+ queryctl->port ? queryctl->port : protocol->port))<0)
+ {
perror("do_protocol: socket");
ok = PS_SOCKET;
goto closeUp;