commit 00ebf45be2e5a0b2215b73ea7883eb51ffae4bc3
Author: Oswald Buddenhagen <[email protected]>
Date: Sun Dec 14 12:36:05 2014 +0100
rename driver::prepare_opts() => prepare_load()
... and move it to the right place in the structure and fix the doc to
not claim that it is called before select().
src/driver.h | 10 +++++-----
src/drv_imap.c | 16 +++++++---------
src/drv_maildir.c | 4 ++--
src/sync.c | 4 ++--
4 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/src/driver.h b/src/driver.h
index 122fdac..aa4dc0e 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -161,16 +161,16 @@ struct driver {
void (*list)( store_t *ctx, int flags,
void (*cb)( int sts, void *aux ), void *aux );
- /* Invoked before select(), this informs the driver which operations
(OP_*)
- * will be performed on the mailbox. The driver may extend the set by
implicitly
- * needed or available operations. */
- void (*prepare_opts)( store_t *ctx, int opts );
-
/* Open the mailbox name. Optionally create missing boxes.
* As a side effect, this should resolve ctx->path if applicable. */
void (*select)( store_t *ctx, const char *name, int create,
void (*cb)( int sts, void *aux ), void *aux );
+ /* Invoked before load(), this informs the driver which operations
(OP_*)
+ * will be performed on the mailbox. The driver may extend the set by
implicitly
+ * needed or available operations. */
+ void (*prepare_load)( store_t *ctx, int opts );
+
/* Load the message attributes needed to perform the requested
operations.
* Consider only messages with UIDs between minuid and maxuid
(inclusive)
* and those named in the excs array (smaller than minuid).
diff --git a/src/drv_imap.c b/src/drv_imap.c
index aa13f97..7efd270 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -2108,14 +2108,6 @@ imap_open_store_bail( imap_store_t *ctx )
cb( 0, aux );
}
-/******************* imap_prepare_opts *******************/
-
-static void
-imap_prepare_opts( store_t *gctx, int opts )
-{
- gctx->opts = opts;
-}
-
/******************* imap_select *******************/
static void
@@ -2148,6 +2140,12 @@ imap_select( store_t *gctx, const char *name, int create,
/******************* imap_load *******************/
+static void
+imap_prepare_load( store_t *gctx, int opts )
+{
+ gctx->opts = opts;
+}
+
static int imap_submit_load( imap_store_t *, const char *, int, struct
imap_cmd_refcounted_state * );
static void
@@ -2781,8 +2779,8 @@ struct driver imap_driver = {
imap_disown_store,
imap_cancel_store,
imap_list,
- imap_prepare_opts,
imap_select,
+ imap_prepare_load,
imap_load,
imap_fetch_msg,
imap_store_msg,
diff --git a/src/drv_maildir.c b/src/drv_maildir.c
index 383193c..e745fb5 100644
--- a/src/drv_maildir.c
+++ b/src/drv_maildir.c
@@ -1041,7 +1041,7 @@ maildir_select( store_t *gctx, const char *name, int
create,
}
static void
-maildir_prepare_opts( store_t *gctx, int opts )
+maildir_prepare_load( store_t *gctx, int opts )
{
if (opts & OPEN_SETFLAGS)
opts |= OPEN_OLD;
@@ -1531,8 +1531,8 @@ struct driver maildir_driver = {
maildir_disown_store,
maildir_disown_store, /* _cancel_, but it's the same */
maildir_list,
- maildir_prepare_opts,
maildir_select,
+ maildir_prepare_load,
maildir_load,
maildir_fetch_msg,
maildir_store_msg,
diff --git a/src/sync.c b/src/sync.c
index b69793a..77fa691 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -1007,8 +1007,8 @@ box_selected( int sts, void *aux )
assert( !"sync record with stray TUID"
);
}
}
- svars->drv[M]->prepare_opts( ctx[M], opts[M] );
- svars->drv[S]->prepare_opts( ctx[S], opts[S] );
+ svars->drv[M]->prepare_load( ctx[M], opts[M] );
+ svars->drv[S]->prepare_load( ctx[S], opts[S] );
mexcs = 0;
nmexcs = rmexcs = 0;
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel