|
|
@ -924,6 +924,7 @@ load_state( sync_vars_t *svars ) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void box_opened( int sts, void *aux ); |
|
|
|
static void box_opened( int sts, void *aux ); |
|
|
|
|
|
|
|
static void load_box( sync_vars_t *svars, int t, int minwuid, int *mexcs, int nmexcs ); |
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
void |
|
|
|
sync_boxes( store_t *ctx[], const char *names[], channel_conf_t *chan, |
|
|
|
sync_boxes( store_t *ctx[], const char *names[], channel_conf_t *chan, |
|
|
@ -968,48 +969,48 @@ sync_boxes( store_t *ctx[], const char *names[], channel_conf_t *chan, |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!prepare_state( svars )) { |
|
|
|
|
|
|
|
svars->ret = SYNC_FAIL; |
|
|
|
|
|
|
|
sync_bail2( svars ); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!load_state( svars )) { |
|
|
|
|
|
|
|
svars->ret = SYNC_FAIL; |
|
|
|
|
|
|
|
sync_bail( svars ); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
sync_ref( svars ); |
|
|
|
sync_ref( svars ); |
|
|
|
for (t = 0; t < 2; t++) { |
|
|
|
for (t = 0; ; t++) { |
|
|
|
info( "Opening %s box %s...\n", str_ms[t], svars->orig_name[t] ); |
|
|
|
info( "Opening %s box %s...\n", str_ms[t], svars->orig_name[t] ); |
|
|
|
svars->drv[t]->open_box( ctx[t], (chan->ops[t] & OP_CREATE) != 0, box_opened, AUX ); |
|
|
|
svars->drv[t]->open_box( ctx[t], (chan->ops[t] & OP_CREATE) != 0, box_opened, AUX ); |
|
|
|
if (check_cancel( svars )) |
|
|
|
if (t || check_cancel( svars )) |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
sync_deref( svars ); |
|
|
|
sync_deref( svars ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void load_box( sync_vars_t *svars, int t, int minwuid, int *mexcs, int nmexcs ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
box_opened( int sts, void *aux ) |
|
|
|
box_opened( int sts, void *aux ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
DECL_SVARS; |
|
|
|
DECL_SVARS; |
|
|
|
sync_rec_t *srec; |
|
|
|
|
|
|
|
store_t *ctx[2]; |
|
|
|
store_t *ctx[2]; |
|
|
|
channel_conf_t *chan; |
|
|
|
channel_conf_t *chan; |
|
|
|
|
|
|
|
sync_rec_t *srec; |
|
|
|
int opts[2], fails; |
|
|
|
int opts[2], fails; |
|
|
|
int *mexcs, nmexcs, rmexcs, minwuid; |
|
|
|
int *mexcs, nmexcs, rmexcs, minwuid; |
|
|
|
|
|
|
|
|
|
|
|
if (check_ret( sts, aux )) |
|
|
|
if (check_ret( sts, aux )) |
|
|
|
return; |
|
|
|
return; |
|
|
|
INIT_SVARS(aux); |
|
|
|
INIT_SVARS(aux); |
|
|
|
ctx[0] = svars->ctx[0]; |
|
|
|
|
|
|
|
ctx[1] = svars->ctx[1]; |
|
|
|
|
|
|
|
chan = svars->chan; |
|
|
|
|
|
|
|
svars->state[t] |= ST_SELECTED; |
|
|
|
svars->state[t] |= ST_SELECTED; |
|
|
|
if (!(svars->state[1-t] & ST_SELECTED)) |
|
|
|
if (!(svars->state[1-t] & ST_SELECTED)) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
ctx[0] = svars->ctx[0]; |
|
|
|
if (!prepare_state( svars )) { |
|
|
|
ctx[1] = svars->ctx[1]; |
|
|
|
svars->ret = SYNC_FAIL; |
|
|
|
chan = svars->chan; |
|
|
|
sync_bail2( svars ); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!load_state( svars )) { |
|
|
|
|
|
|
|
svars->ret = SYNC_FAIL; |
|
|
|
|
|
|
|
sync_bail( svars ); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fails = 0; |
|
|
|
fails = 0; |
|
|
|
for (t = 0; t < 2; t++) |
|
|
|
for (t = 0; t < 2; t++) |
|
|
|