Browse Source

fix chaining of COMPRESS invocation

it was bound to the use of NAMESPACE, which made no sense at all.
wip/server-refactor
Oswald Buddenhagen 10 years ago
parent
commit
1701e3d84f
  1. 15
      src/drv_imap.c

15
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( imap_store_t * );
static void imap_open_store_namespace_p2( imap_store_t *, struct imap_cmd *, int ); 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_namespace2( imap_store_t * );
static void imap_open_store_compress( imap_store_t * );
#ifdef HAVE_LIBZ #ifdef HAVE_LIBZ
static void imap_open_store_compress_p2( imap_store_t *, struct imap_cmd *, int ); static void imap_open_store_compress_p2( imap_store_t *, struct imap_cmd *, int );
#endif #endif
@ -2055,7 +2056,7 @@ imap_open_store_namespace( imap_store_t *ctx )
imap_open_store_namespace2( ctx ); imap_open_store_namespace2( ctx );
return; return;
} }
imap_open_store_finalize( ctx ); imap_open_store_compress( ctx );
} }
static void static void
@ -2085,6 +2086,15 @@ imap_open_store_namespace2( imap_store_t *ctx )
ctx->prefix = nsp_1st_ns->val; ctx->prefix = nsp_1st_ns->val;
if (!ctx->delimiter) if (!ctx->delimiter)
ctx->delimiter = nfstrdup( nsp_1st_dl->val ); ctx->delimiter = nfstrdup( nsp_1st_dl->val );
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 #ifdef HAVE_LIBZ
if (CAP(COMPRESS_DEFLATE)) { /* XXX make that configurable */ if (CAP(COMPRESS_DEFLATE)) { /* XXX make that configurable */
imap_exec( ctx, 0, imap_open_store_compress_p2, "COMPRESS DEFLATE" ); imap_exec( ctx, 0, imap_open_store_compress_p2, "COMPRESS DEFLATE" );
@ -2092,9 +2102,6 @@ imap_open_store_namespace2( imap_store_t *ctx )
} }
#endif #endif
imap_open_store_finalize( ctx ); imap_open_store_finalize( ctx );
} else {
imap_open_store_bail( ctx, FAIL_FINAL );
}
} }
#ifdef HAVE_LIBZ #ifdef HAVE_LIBZ

Loading…
Cancel
Save