do not repeatedly get namespace from server.
This commit is contained in:
parent
340bfcc4a8
commit
b7389cb36f
|
@ -112,6 +112,7 @@ typedef struct imap_store {
|
||||||
const char *prefix;
|
const char *prefix;
|
||||||
unsigned /*currentnc:1,*/ trashnc:1;
|
unsigned /*currentnc:1,*/ trashnc:1;
|
||||||
int uidnext; /* from SELECT responses */
|
int uidnext; /* from SELECT responses */
|
||||||
|
unsigned got_namespace:1;
|
||||||
list_t *ns_personal, *ns_other, *ns_shared; /* NAMESPACE info */
|
list_t *ns_personal, *ns_other, *ns_shared; /* NAMESPACE info */
|
||||||
message_t **msgapp; /* FETCH results */
|
message_t **msgapp; /* FETCH results */
|
||||||
unsigned caps, rcaps; /* CAPABILITY results */
|
unsigned caps, rcaps; /* CAPABILITY results */
|
||||||
|
@ -1400,8 +1401,11 @@ imap_open_store( store_conf_t *conf )
|
||||||
ctx->prefix = conf->path;
|
ctx->prefix = conf->path;
|
||||||
else if (cfg->use_namespace && CAP(NAMESPACE)) {
|
else if (cfg->use_namespace && CAP(NAMESPACE)) {
|
||||||
/* get NAMESPACE info */
|
/* get NAMESPACE info */
|
||||||
if (imap_exec( ctx, 0, "NAMESPACE" ) != RESP_OK)
|
if (!ctx->got_namespace) {
|
||||||
goto bail;
|
if (imap_exec( ctx, 0, "NAMESPACE" ) != RESP_OK)
|
||||||
|
goto bail;
|
||||||
|
ctx->got_namespace = 1;
|
||||||
|
}
|
||||||
/* XXX for now assume personal namespace */
|
/* XXX for now assume personal namespace */
|
||||||
if (is_list( ctx->ns_personal ) &&
|
if (is_list( ctx->ns_personal ) &&
|
||||||
is_list( ctx->ns_personal->child ) &&
|
is_list( ctx->ns_personal->child ) &&
|
||||||
|
|
Loading…
Reference in New Issue
Block a user