commit 426d56b0bd6cec108800a7eb3c85b51072317c31
Author: Oswald Buddenhagen <[email protected]>
Date: Mon Jun 13 12:02:00 2011 +0200
move setting of ctx->listed outside the drivers
it's essentially an external state flag
src/drv_imap.c | 5 +----
src/drv_maildir.c | 1 -
src/main.c | 1 +
3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/drv_imap.c b/src/drv_imap.c
index 5d229b8..5b6e469 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -1737,11 +1737,8 @@ imap_list( store_t *gctx,
void (*cb)( int sts, void *aux ), void *aux )
{
imap_store_t *ctx = (imap_store_t *)gctx;
- int ret;
- if ((ret = imap_exec_b( ctx, 0, "LIST \"\" \"%s%%\"", ctx->prefix )) ==
DRV_OK)
- gctx->listed = 1;
- cb( ret, aux );
+ cb( imap_exec_b( ctx, 0, "LIST \"\" \"%s%%\"", ctx->prefix ), aux );
}
static void
diff --git a/src/drv_maildir.c b/src/drv_maildir.c
index 09d5e5f..020da73 100644
--- a/src/drv_maildir.c
+++ b/src/drv_maildir.c
@@ -186,7 +186,6 @@ maildir_list( store_t *gctx,
!memcmp( buf, inbox, bl - 4 ) && !inbox[bl -
4] ? "INBOX" : de->d_name );
}
closedir (dir);
- gctx->listed = 1;
cb( DRV_OK, aux );
}
diff --git a/src/main.c b/src/main.c
index 7899a0e..5156212 100644
--- a/src/main.c
+++ b/src/main.c
@@ -705,6 +705,7 @@ store_listed( int sts, void *aux )
mvars->state[t] = ST_OPEN;
switch (sts) {
case DRV_OK:
+ mvars->ctx[t]->listed = 1;
if (mvars->ctx[t]->conf->map_inbox)
add_string_list( &mvars->ctx[t]->boxes,
mvars->ctx[t]->conf->map_inbox );
break;
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel