From d2f54bbc4ef071a92508fa26d5d4641a3f2215c1 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Sun, 6 Nov 2005 00:34:56 +0000 Subject: [PATCH] Fix a compile error if building nmh with --enable-apop. --- ChangeLog | 3 +++ uip/popsbr.c | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d02b8a..6d2553e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-11-06 Peter Maydell + * uip/popsbr.c: fix compile error which only showed up if nmh + was configured with --enable-apop. + * Debian Bug# 245932, RedHat Bug# 172388: uip/mhparse.c: don't crash when handling a multipart MIME message with an invalid Content-Type header (file handle was being fclose()d twice). diff --git a/uip/popsbr.c b/uip/popsbr.c index 6d8d820..e7ea911 100644 --- a/uip/popsbr.c +++ b/uip/popsbr.c @@ -500,6 +500,13 @@ pop_init (char *host, char *user, char *pass, char *proxy, int snoop, int fd1, fd2; char buffer[BUFSIZ]; +#ifdef APOP + int apop; + + if ((apop = rpop) < 0) + rpop = 0; +#endif + if (proxy && *proxy) { int pid; int inpipe[2]; /* for reading from the server */ @@ -549,13 +556,6 @@ pop_init (char *host, char *user, char *pass, char *proxy, int snoop, } else { -#ifdef APOP - int apop; - - if ((apop = rpop) < 0) - rpop = 0; -#endif - #ifndef NNTP if ( kpop ) { # ifdef KPOP -- 1.7.10.4