commit b00aac4c5e4231415f5205024cf02fe1fd433754
Author:     Oswald Buddenhagen <o...@kde.org>
AuthorDate: Sat Mar 30 09:38:38 2013 +0100
Commit:     Oswald Buddenhagen <o...@users.sf.net>
CommitDate: Sat Mar 30 16:46:18 2013 +0100

    rename sync_vars_t::uidnext => newuid & fix comment
    
    the purpose of this variable is to hold the UIDNEXT value from before
    we started pushing new messages, i.e., the minimal uid we can expect
    them to have.

 src/sync.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/sync.c b/src/sync.c
index e865bdb..c112beb 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -155,7 +155,7 @@ typedef struct {
        int trash_total[2], trash_done[2];
        int maxuid[2]; /* highest UID that was already propagated */
        int uidval[2]; /* UID validity value */
-       int uidnext[2]; /* next expected UID; TUID lookup makes sense only for 
lower UIDs */
+       int newuid[2]; /* TUID lookup makes sense only for UIDs >= this */
        int smaxxuid; /* highest expired UID on slave */
 } sync_vars_t;
 
@@ -725,8 +725,8 @@ box_selected( int sts, void *aux )
                        return;
                }
                if (sscanf( buf, "%63s %63s", buf1, buf2 ) != 2 ||
-                   sscanf( buf1, "%d:%d:%d", &svars->uidval[M], 
&svars->maxuid[M], &svars->uidnext[M] ) < 2 ||
-                   sscanf( buf2, "%d:%d:%d:%d", &svars->uidval[S], 
&svars->smaxxuid, &svars->maxuid[S], &svars->uidnext[S] ) < 3) {
+                   sscanf( buf1, "%d:%d:%d", &svars->uidval[M], 
&svars->maxuid[M], &svars->newuid[M] ) < 2 ||
+                   sscanf( buf2, "%d:%d:%d:%d", &svars->uidval[S], 
&svars->smaxxuid, &svars->maxuid[S], &svars->newuid[S] ) < 3) {
                        error( "Error: invalid sync state header in %s\n", 
svars->dname );
                        goto jbail;
                }
@@ -804,9 +804,9 @@ box_selected( int sts, void *aux )
                                else if (buf[0] == ')')
                                        svars->maxuid[S] = t1;
                                else if (buf[0] == '{')
-                                       svars->uidnext[M] = t1;
+                                       svars->newuid[M] = t1;
                                else if (buf[0] == '}')
-                                       svars->uidnext[S] = t1;
+                                       svars->newuid[S] = t1;
                                else if (buf[0] == '|') {
                                        svars->uidval[M] = t1;
                                        svars->uidval[S] = t2;
@@ -998,7 +998,7 @@ load_box( sync_vars_t *svars, int t, int minwuid, int 
*mexcs, int nmexcs )
                maxwuid = 0;
        info( "Loading %s...\n", str_ms[t] );
        debug( maxwuid == INT_MAX ? "loading %s [%d,inf]\n" : "loading %s 
[%d,%d]\n", str_ms[t], minwuid, maxwuid );
-       DRIVER_CALL_RET(load( svars->ctx[t], minwuid, maxwuid, 
svars->uidnext[t], mexcs, nmexcs, box_loaded, AUX ));
+       DRIVER_CALL_RET(load( svars->ctx[t], minwuid, maxwuid, 
svars->newuid[t], mexcs, nmexcs, box_loaded, AUX ));
 }
 
 typedef struct {

------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to