version 1.56.2.4, 2005/01/28 17:29:50
|
version 1.56.2.5, 2005/03/14 22:25:02
|
Line 1
|
Line 1
|
/* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.56.2.3 2005/01/20 18:04:04 kurt Exp $ */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.56.2.4 2005/01/28 17:29:50 kurt Exp $ */ |
/* syncprov.c - syncrepl provider */ |
/* syncprov.c - syncrepl provider */ |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
* |
* |
Line 861 syncprov_drop_psearch( syncops *so, int
|
Line 861 syncprov_drop_psearch( syncops *so, int
|
} |
} |
|
|
static int |
static int |
|
syncprov_ab_cleanup( Operation *op, SlapReply *rs ) |
|
{ |
|
slap_callback *sc = op->o_callback; |
|
op->o_callback = sc->sc_next; |
|
syncprov_drop_psearch( op->o_callback->sc_private, 0 ); |
|
op->o_tmpfree( sc, op->o_tmpmemctx ); |
|
return 0; |
|
} |
|
|
|
static int |
syncprov_op_abandon( Operation *op, SlapReply *rs ) |
syncprov_op_abandon( Operation *op, SlapReply *rs ) |
{ |
{ |
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; |
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; |
Line 881 syncprov_op_abandon( Operation *op, Slap
|
Line 891 syncprov_op_abandon( Operation *op, Slap
|
if ( so ) { |
if ( so ) { |
/* Is this really a Cancel exop? */ |
/* Is this really a Cancel exop? */ |
if ( op->o_tag != LDAP_REQ_ABANDON ) { |
if ( op->o_tag != LDAP_REQ_ABANDON ) { |
|
so->s_op->o_cancel = SLAP_CANCEL_ACK; |
rs->sr_err = LDAP_CANCELLED; |
rs->sr_err = LDAP_CANCELLED; |
send_ldap_result( so->s_op, rs ); |
send_ldap_result( so->s_op, rs ); |
|
if ( so->s_flags & PS_IS_DETACHED ) { |
|
slap_callback *cb; |
|
cb = op->o_tmpcalloc( 1, sizeof(slap_callback), op->o_tmpmemctx ); |
|
cb->sc_cleanup = syncprov_ab_cleanup; |
|
cb->sc_next = op->o_callback; |
|
cb->sc_private = so; |
|
return SLAP_CB_CONTINUE; |
|
} |
} |
} |
syncprov_drop_psearch( so, 0 ); |
syncprov_drop_psearch( so, 0 ); |
} |
} |
Line 1468 syncprov_op_mod( Operation *op, SlapRepl
|
Line 1487 syncprov_op_mod( Operation *op, SlapRepl
|
ldap_pvt_thread_mutex_unlock( &mt->mt_mutex ); |
ldap_pvt_thread_mutex_unlock( &mt->mt_mutex ); |
ldap_pvt_thread_yield(); |
ldap_pvt_thread_yield(); |
ldap_pvt_thread_mutex_lock( &mt->mt_mutex ); |
ldap_pvt_thread_mutex_lock( &mt->mt_mutex ); |
|
|
|
/* clean up if the caller is giving up */ |
|
if ( op->o_abandon ) { |
|
modinst *m2; |
|
for ( m2 = mt->mt_mods; m2->mi_next != mi; |
|
m2 = m2->mi_next ); |
|
m2->mi_next = mi->mi_next; |
|
if ( mt->mt_tail == mi ) mt->mt_tail = m2; |
|
op->o_tmpfree( cb, op->o_tmpmemctx ); |
|
ldap_pvt_thread_mutex_unlock( &mt->mt_mutex ); |
|
return SLAPD_ABANDON; |
|
} |
} |
} |
ldap_pvt_thread_mutex_unlock( &mt->mt_mutex ); |
ldap_pvt_thread_mutex_unlock( &mt->mt_mutex ); |
} else { |
} else { |