isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 0162c9f5b88fd41823e46dee2d73979e72cae164
parent d6fd1939ba20854d4267952046783892cf1191f7
Author: Michael Elkins <me@mutt.org>
Date:   Thu, 27 Jun 2002 03:51:51 +0000

Oswald Buddenhagen <ossi@kde.org>
* fix imap_open() brokeness with PREAUTH (missed hunk from previous patch)

Diffstat:
Mimap.c | 50+++++++++++++++++++++++++-------------------------
1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/imap.c b/imap.c @@ -685,36 +685,36 @@ imap_open (config_t * box, unsigned int minuid, imap_t * imap, int flags) do { - /* read the greeting string */ - if (buffer_gets (imap->buf, &rsp)) - { - puts ("Error, no greeting response"); - ret = -1; - break; - } - if (Verbose) - puts (rsp); - arg = next_arg (&rsp); - if (!arg || *arg != '*' || (arg = next_arg (&rsp)) == NULL) - { - puts ("Error, invalid greeting response"); - ret = -1; - break; - } - if (!strcmp ("PREAUTH", arg)) - preauth = 1; - else if (strcmp ("OK", arg) != 0) - { - puts ("Error, unknown greeting response"); - ret = -1; - break; - } - /* if we are reusing the existing connection, we can skip the * authentication steps. */ if (!reuse) { + /* read the greeting string */ + if (buffer_gets (imap->buf, &rsp)) + { + puts ("Error, no greeting response"); + ret = -1; + break; + } + if (Verbose) + puts (rsp); + arg = next_arg (&rsp); + if (!arg || *arg != '*' || (arg = next_arg (&rsp)) == NULL) + { + puts ("Error, invalid greeting response"); + ret = -1; + break; + } + if (!strcmp ("PREAUTH", arg)) + preauth = 1; + else if (strcmp ("OK", arg) != 0) + { + puts ("Error, unknown greeting response"); + ret = -1; + break; + } + #if HAVE_LIBSSL if (box->use_imaps) use_ssl = 1;