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 /fetchmail.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 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 12 |
1 files changed, 6 insertions, 6 deletions
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); |