X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fpopsbr.c;h=e7ea911e6ea4408e9569f63d5dbf231987e0e31f;hb=e2c71f66b925a33cceb1ea4b75a62a05333d124a;hp=aa396fd23844bb060d987f062ab744c805231c99;hpb=99e5043db7ee6cf80f93708610a6e584a8068c6a;p=mmh diff --git a/uip/popsbr.c b/uip/popsbr.c index aa396fd..e7ea911 100644 --- a/uip/popsbr.c +++ b/uip/popsbr.c @@ -26,8 +26,8 @@ extern int client(char *args, char *protocol, char *service, int rproto, #endif #ifdef CYRUS_SASL -# include -# include +# include +# include #endif /* CYRUS_SASL */ #include @@ -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,28 +556,22 @@ 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 -# 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;