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 --- fetchmail.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'fetchmail.c') diff --git a/fetchmail.c b/fetchmail.c index fefa06d6..7befcce9 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -463,11 +463,11 @@ int main (int argc, char **argv) * deliver it until the input socket is closed. */ for (ctl = querylist; ctl; ctl = ctl->next) - if (ctl->smtp_sockfp) + if (ctl->smtp_socket != -1) { - SMTP_quit(ctl->smtp_sockfp); - fclose(ctl->smtp_sockfp); - ctl->smtp_sockfp = (FILE *)NULL; + SMTP_quit(ctl->smtp_socket); + close(ctl->smtp_socket); + ctl->smtp_socket = -1; } /* @@ -712,8 +712,8 @@ void termhook(int sig) else /* terminate all SMTP connections cleanly */ for (ctl = querylist; ctl; ctl = ctl->next) - if (ctl->smtp_sockfp != (FILE *)NULL) - SMTP_quit(ctl->smtp_sockfp); + if (ctl->smtp_socket != -1) + SMTP_quit(ctl->smtp_socket); if (!check_only) write_saved_lists(querylist, idfile); -- cgit v1.2.3