commit c206dd85365636a6abf634aeed79450eeb942280
Author: Oswald Buddenhagen <[email protected]>
Date: Sat Jul 27 18:46:57 2013 +0200
CHECK before FETCH after STORE
m$ exchange does not seem to update the index in time otherwise.
src/drv_imap.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/drv_imap.c b/src/drv_imap.c
index c8dca09..4ed8c6f 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -1958,6 +1958,8 @@ imap_store_msg_p2( imap_store_t *ctx ATTR_UNUSED, struct
imap_cmd *cmd, int resp
/******************* imap_find_new_msgs *******************/
+static void imap_find_new_msgs_p2( imap_store_t *, struct imap_cmd *, int );
+
static void
imap_find_new_msgs( store_t *gctx,
void (*cb)( int sts, void *aux ), void *aux )
@@ -1966,6 +1968,19 @@ imap_find_new_msgs( store_t *gctx,
struct imap_cmd_simple *cmd;
INIT_IMAP_CMD(imap_cmd_simple, cmd, cb, aux)
+ imap_exec( (imap_store_t *)ctx, &cmd->gen, imap_find_new_msgs_p2,
"CHECK" );
+}
+
+static void
+imap_find_new_msgs_p2( imap_store_t *ctx, struct imap_cmd *gcmd, int response )
+{
+ struct imap_cmd_simple *cmdp = (struct imap_cmd_simple *)gcmd, *cmd;
+
+ if (response != RESP_OK) {
+ imap_done_simple_box( ctx, gcmd, response );
+ return;
+ }
+ INIT_IMAP_CMD(imap_cmd_simple, cmd, cmdp->callback, cmdp->callback_aux)
imap_exec( (imap_store_t *)ctx, &cmd->gen, imap_done_simple_box,
"UID FETCH %d:1000000000 (UID BODY.PEEK[HEADER.FIELDS
(X-TUID)])", ctx->gen.uidnext );
}
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel