version 1.147.2.87, 2011/01/13 21:26:52
|
version 1.147.2.88, 2011/01/13 21:56:59
|
Line 2415 syncprov_op_search( Operation *op, SlapR
|
Line 2415 syncprov_op_search( Operation *op, SlapR
|
sync_control *srs; |
sync_control *srs; |
BerVarray ctxcsn; |
BerVarray ctxcsn; |
int i, *sids, numcsns; |
int i, *sids, numcsns; |
struct berval mincsn; |
struct berval mincsn, maxcsn; |
int dirty = 0; |
int dirty = 0; |
|
|
if ( !(op->o_sync_mode & SLAP_SYNC_REFRESH) ) return SLAP_CB_CONTINUE; |
if ( !(op->o_sync_mode & SLAP_SYNC_REFRESH) ) return SLAP_CB_CONTINUE; |
Line 2530 syncprov_op_search( Operation *op, SlapR
|
Line 2530 syncprov_op_search( Operation *op, SlapR
|
i++; |
i++; |
} |
} |
|
|
/* Find the smallest CSN */ |
/* Find the smallest CSN which differs from contextCSN */ |
mincsn = srs->sr_state.ctxcsn[0]; |
mincsn.bv_len = 0; |
for ( i=1; i<srs->sr_state.numcsns; i++ ) { |
maxcsn.bv_len = 0; |
if ( ber_bvcmp( &mincsn, &srs->sr_state.ctxcsn[i] ) > 0 ) |
for ( i=0; i<srs->sr_state.numcsns; i++ ) { |
mincsn = srs->sr_state.ctxcsn[i]; |
for ( j=0; j<numcsns; j++ ) { |
} |
if ( srs->sr_state.sids[i] != sids[j] ) |
|
continue; |
|
if ( BER_BVISEMPTY( &maxcsn ) || ber_bvcmp( &maxcsn, |
|
&srs->sr_state.ctxcsn[i] ) < 0 ) { |
|
maxcsn = srs->sr_state.ctxcsn[i]; |
|
} |
|
if ( ber_bvcmp( &srs->sr_state.ctxcsn[i], &ctxcsn[j] ) < 0) { |
|
if ( BER_BVISEMPTY( &mincsn ) || ber_bvcmp( &mincsn, |
|
&srs->sr_state.ctxcsn[i] ) > 0 ) { |
|
mincsn = srs->sr_state.ctxcsn[i]; |
|
} |
|
} |
|
} |
|
} |
|
if ( BER_BVISEMPTY( &mincsn )) |
|
mincsn = maxcsn; |
|
|
/* If nothing has changed, shortcut it */ |
/* If nothing has changed, shortcut it */ |
if ( srs->sr_state.numcsns == numcsns ) { |
if ( srs->sr_state.numcsns == numcsns ) { |