X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fpopsbr.c;h=bfc39eaa5482f42e2516f26f887036acaac18a11;hp=eec025dc46584ac962c72e3404a0bd52a5cdce37;hb=0d1c5f533f3a6cd1c7f038f59585378f53b666c2;hpb=c0a38419e027e400b370db10086bcb8a3c981ce7 diff --git a/uip/popsbr.c b/uip/popsbr.c index eec025d..bfc39ea 100644 --- a/uip/popsbr.c +++ b/uip/popsbr.c @@ -118,7 +118,7 @@ pop_auth (char *user, char *pass) int -pop_init (char *host, char *user, char *pass, int snoop, int rpop) +pop_init (char *host, char *user, char *pass, int snoop, int rpop, int kpop) { int fd1, fd2; char buffer[BUFSIZ]; @@ -131,16 +131,23 @@ pop_init (char *host, char *user, char *pass, int snoop, int rpop) #endif #ifndef NNTP -# ifndef KPOP - if ((fd1 = client (host, "tcp", POPSERVICE, rpop, response, sizeof(response))) == NOTOK) -# else /* KPOP */ - snprintf (buffer, sizeof(buffer), "%s/%s", KPOP_PRINCIPAL, POPSERVICE); - if ((fd1 = client (host, "tcp", buffer, rpop, response, sizeof(response))) == NOTOK) -# endif +# ifdef KPOP + if ( kpop ) { + snprintf (buffer, sizeof(buffer), "%s/%s", KPOP_PRINCIPAL, "kpop"); + if ((fd1 = client (host, "tcp", buffer, 0, response, sizeof(response))) == NOTOK) { + return NOTOK; + } + } else { +# endif /* KPOP */ + 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) -#endif return NOTOK; +#endif if ((fd2 = dup (fd1)) == NOTOK) { char *s;