commit 4842f5148da89e7627f1b0c38f920d0fce992e76
Author: Oswald Buddenhagen <o...@users.sf.net>
Date:   Sat Mar 21 12:18:56 2015 +0100

    fix bogus "unexpected command continuation request"
    
    it helps if the code actually does what the comment above it claims.
    clarify it a bit, so i don't get stupid ideas again.
    
    This reverts commit cf6a7b4d182d2fe82f7371af9e5a857818f3d02d.

 src/drv_imap.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/drv_imap.c b/src/drv_imap.c
index f58736d..867053a 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -1241,9 +1241,10 @@ imap_socket_read( void *aux )
                        error( "IMAP error: unexpected reply: %s %s\n", arg, 
cmd ? cmd : "" );
                        break; /* this may mean anything, so prefer not to spam 
the log */
                } else if (*arg == '+') {
-                       /* This can happen only with the last command underway, 
as
-                          it enforces a round-trip. */
-                       cmdp = ctx->in_progress;
+                       /* There can be any number of commands in flight, but 
only the last
+                        * one can require a continuation, as it enforces a 
round-trip. */
+                       cmdp = (struct imap_cmd *)((char 
*)ctx->in_progress_append -
+                                                  offsetof(struct imap_cmd, 
next));
                        if (cmdp->param.data) {
                                if (cmdp->param.to_trash)
                                        ctx->trashnc = TrashKnown; /* Can't get 
NO [TRYCREATE] any more. */

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to