From 451d98c467f141e7802b91d26869b6e38ee868fc Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 13 May 1997 23:42:04 +0000 Subject: 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 --- etrn.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'etrn.c') diff --git a/etrn.c b/etrn.c index a2254c79..b8e8fffa 100644 --- a/etrn.c +++ b/etrn.c @@ -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 */ -- cgit v1.2.3