commit 1701e3d84f333533060140f0c8e51dc2bebcade3
Author: Oswald Buddenhagen <o...@users.sf.net>
Date:   Sat Mar 7 17:46:41 2015 +0100

    fix chaining of COMPRESS invocation
    
    it was bound to the use of NAMESPACE, which made no sense at all.

 src/drv_imap.c |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/src/drv_imap.c b/src/drv_imap.c
index 2620f49..29c01d4 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -1527,6 +1527,7 @@ static void imap_open_store_authenticate2_p2( 
imap_store_t *, struct imap_cmd *,
 static void imap_open_store_namespace( imap_store_t * );
 static void imap_open_store_namespace_p2( imap_store_t *, struct imap_cmd *, 
int );
 static void imap_open_store_namespace2( imap_store_t * );
+static void imap_open_store_compress( imap_store_t * );
 #ifdef HAVE_LIBZ
 static void imap_open_store_compress_p2( imap_store_t *, struct imap_cmd *, 
int );
 #endif
@@ -2055,7 +2056,7 @@ imap_open_store_namespace( imap_store_t *ctx )
                        imap_open_store_namespace2( ctx );
                return;
        }
-       imap_open_store_finalize( ctx );
+       imap_open_store_compress( ctx );
 }
 
 static void
@@ -2085,18 +2086,24 @@ imap_open_store_namespace2( imap_store_t *ctx )
                        ctx->prefix = nsp_1st_ns->val;
                if (!ctx->delimiter)
                        ctx->delimiter = nfstrdup( nsp_1st_dl->val );
-#ifdef HAVE_LIBZ
-               if (CAP(COMPRESS_DEFLATE)) { /* XXX make that configurable */
-                       imap_exec( ctx, 0, imap_open_store_compress_p2, 
"COMPRESS DEFLATE" );
-                       return;
-               }
-#endif
-               imap_open_store_finalize( ctx );
+               imap_open_store_compress( ctx );
        } else {
                imap_open_store_bail( ctx, FAIL_FINAL );
        }
 }
 
+static void
+imap_open_store_compress( imap_store_t *ctx )
+{
+#ifdef HAVE_LIBZ
+       if (CAP(COMPRESS_DEFLATE)) { /* XXX make that configurable */
+               imap_exec( ctx, 0, imap_open_store_compress_p2, "COMPRESS 
DEFLATE" );
+               return;
+       }
+#endif
+       imap_open_store_finalize( ctx );
+}
+
 #ifdef HAVE_LIBZ
 static void
 imap_open_store_compress_p2( imap_store_t *ctx, struct imap_cmd *cmd 
ATTR_UNUSED, int response )

------------------------------------------------------------------------------
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