diff options
Diffstat (limited to 'imap/src/c-client/nntp.c')
-rw-r--r-- | imap/src/c-client/nntp.c | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/imap/src/c-client/nntp.c b/imap/src/c-client/nntp.c index 5a805e86..cee546d1 100644 --- a/imap/src/c-client/nntp.c +++ b/imap/src/c-client/nntp.c @@ -1,13 +1,5 @@ /* ======================================================================== - * Copyright 1988-2007 University of Washington - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * + * Copyright 2008-2011 Mark Crispin * ======================================================================== */ @@ -15,18 +7,24 @@ * Program: Network News Transfer Protocol (NNTP) routines * * Author: Mark Crispin - * Networks and Distributed Computing - * Computing & Communications - * University of Washington - * Administration Building, AG-44 - * Seattle, WA 98195 - * Internet: MRC@CAC.Washington.EDU * * Date: 10 February 1992 - * Last Edited: 6 September 2007 + * Last Edited: 8 April 2011 + * + * Previous versions of this file were: + * + * Copyright 1988-2007 University of Washington + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * */ + #include <ctype.h> #include <stdio.h> #include "c-client.h" @@ -385,7 +383,7 @@ void nntp_list (MAILSTREAM *stream,char *ref,char *pat) void nntp_lsub (MAILSTREAM *stream,char *ref,char *pat) { void *sdb = NIL; - char *s,mbx[MAILTMPLEN]; + char *s,mbx[MAILTMPLEN],tmp[MAILTMPLEN]; /* return data from newsrc */ if (nntp_canonicalize (ref,pat,mbx,NIL)) newsrc_lsub (stream,mbx); if (*pat == '{') { /* if remote pattern, must be NNTP */ @@ -398,9 +396,10 @@ void nntp_lsub (MAILSTREAM *stream,char *ref,char *pat) if (ref && *ref) sprintf (mbx,"%s%s",ref,pat); else strcpy (mbx,pat); - if (s = sm_read (&sdb)) do if (nntp_valid (s) && pmatch (s,mbx)) + if (s = sm_read (tmp,&sdb)) do if (nntp_valid (s) && pmatch (s,mbx)) mm_lsub (stream,NIL,s,NIL); - while (s = sm_read (&sdb)); /* until no more subscriptions */ + /* until no more subscriptions */ + while (s = sm_read (tmp,&sdb)); } /* NNTP canonicalize newsgroup name @@ -760,6 +759,10 @@ MAILSTREAM *nntp_mopen (MAILSTREAM *stream) if (LOCAL->tlssslv23) strcat (tmp,"/tls-sslv23"); if (LOCAL->notlsflag) strcat (tmp,"/notls"); if (LOCAL->sslflag) strcat (tmp,"/ssl"); + if (LOCAL->tls1) strcat (tmp,"/tls1"); + if (LOCAL->dtls1) strcat (tmp,"/dtls1"); + if (LOCAL->tls1_1) strcat (tmp,"/tls1_1"); + if (LOCAL->tls1_2) strcat (tmp,"/tls1_2"); if (LOCAL->novalidate) strcat (tmp,"/novalidate-cert"); if (LOCAL->nntpstream->loser) strcat (tmp,"/loser"); if (stream->secure) strcat (tmp,"/secure"); |