diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-05-13 23:42:04 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-05-13 23:42:04 +0000 |
commit | 451d98c467f141e7802b91d26869b6e38ee868fc (patch) | |
tree | 7db5f650940300bb81cd23ab9d41a312ece63e68 /etrn.c | |
parent | 2cbdef3efbe733325aea934ed3ffab9e9ba6175e (diff) | |
download | fetchmail-451d98c467f141e7802b91d26869b6e38ee868fc.tar.gz fetchmail-451d98c467f141e7802b91d26869b6e38ee868fc.tar.bz2 fetchmail-451d98c467f141e7802b91d26869b6e38ee868fc.zip |
Change type of socket descriptors from FILE * to int. Change SockGets
to SockRead a la read(2). This is all part of an attempt to deal with
embedded NULs in IMAP messages.
svn path=/trunk/; revision=992
Diffstat (limited to 'etrn.c')
-rw-r--r-- | etrn.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -10,26 +10,26 @@ #include "smtp.h" #include "socket.h" -static int etrn_ok (FILE *sockfp, char *argbuf) +static int etrn_ok (int sock, char *argbuf) /* parse command response */ { int ok; char buf [POPBUFSIZE+1]; - ok = SMTP_ok(sockfp); + ok = SMTP_ok(sock); if (ok == SM_UNRECOVERABLE) return(PS_PROTOCOL); else return(ok); } -static int etrn_getrange(FILE *sockfp, struct query *ctl, int*countp, int*newp) +static int etrn_getrange(int sock, struct query *ctl, int*countp, int*newp) /* send ETRN and interpret the response */ { int ok, opts; char buf [POPBUFSIZE+1]; - if ((ok = SMTP_ehlo(sockfp, ctl->server.names->id, &opts))) + if ((ok = SMTP_ehlo(sock, ctl->server.names->id, &opts))) { error(0, 0, "%s's SMTP listener does not support ESMTP", ctl->server.names->id); @@ -45,8 +45,8 @@ static int etrn_getrange(FILE *sockfp, struct query *ctl, int*countp, int*newp) *countp = *newp = -1; /* make sure we don't enter the fetch loop */ /* ship the actual poll and get the response */ - gen_send(sockfp, "ETRN %s", ctl->smtphost); - if (ok = gen_recv(sockfp, buf, sizeof(buf))) + gen_send(sock, "ETRN %s", ctl->smtphost); + if (ok = gen_recv(sock, buf, sizeof(buf))) return(ok); /* this switch includes all the response codes described in RFC1985 */ |