fail when kpop connection attempted without KPOP support compiled in
authorOliver Kiddle <okiddle@yahoo.co.uk>
Wed, 2 Nov 2005 17:43:21 +0000 (17:43 +0000)
committerOliver Kiddle <okiddle@yahoo.co.uk>
Wed, 2 Nov 2005 17:43:21 +0000 (17:43 +0000)
ChangeLog
uip/popsbr.c

index 5cfb87a..3b17470 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-11-02  Oliver Kiddle  <okiddle@yahoo.co.uk>
 
+       * Debian Bug# 320069: Nick Rusnov: uip/popsbr.c: fail when
+       kpop connection attempted without KPOP support compiled in
+
        * Debian Bug# 320090: Nick Rusnov: sbr/Makefile.in: fix for newer
        version of flex and remove autogenerated file from cvs
 
index 10d9cba..6d8d820 100644 (file)
@@ -557,20 +557,21 @@ pop_init (char *host, char *user, char *pass, char *proxy, int snoop,
 #endif
 
 #ifndef NNTP
-# ifdef KPOP
        if ( kpop ) {
+# ifdef KPOP
            snprintf (buffer, sizeof(buffer), "%s/%s", KPOP_PRINCIPAL, "kpop");
            if ((fd1 = client (host, "tcp", buffer, 0, response, sizeof(response))) == NOTOK) {
                return NOTOK;
            }
-       } else {
+# else  /* KPOP */
+           snprintf (response, sizeof(response), "this version of nmh compiled without KPOP support");
+           return NOTOK;
 # endif /* KPOP */
+       } else {
            if ((fd1 = client (host, "tcp", POPSERVICE, rpop, response, sizeof(response))) == NOTOK) {
                return NOTOK;
            }
-# ifdef KPOP
        }
-# endif /* KPOP */
 #else  /* NNTP */
        if ((fd1 = client (host, "tcp", "nntp", rpop, response, sizeof(response))) == NOTOK)
            return NOTOK;