return 0;
}
-void ad_unparse_options( BerVarray *res ){
+void
+ad_unparse_options( BerVarray *res )
+{
int i;
- for ( i=0; i < option_count; i++ ) {
- ber_bvarray_add( res, ber_bvdup( &(options[i].name) ));
- }
+ for ( i = 0; i < option_count; i++ ) {
+ value_add_one( res, &options[i].name );
+ }
}
/* Find the definition of the option name or prefix matching the arguments */
sl->sl_mincsn.bv_len = se->se_csn.bv_len;
ch_free( se );
sl->sl_num--;
- if ( !sl->sl_head ) {
- sl->sl_tail = NULL;
- }
}
ldap_pvt_thread_mutex_unlock( &sl->sl_mutex );
}
LDAP_STAILQ_INSERT_TAIL( &op->o_conn->c_ops, op2, o_next );
so->s_flags |= PS_IS_DETACHED;
ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
+
+ /* Prevent anyone else from trying to send a result for this op */
+ op->o_abandon = 1;
}
static int
/* syncprov_findbase expects to be called as a callback... */
sc.sc_private = &opc;
opc.son = on;
+ ldap_pvt_thread_mutex_init( &so.s_mutex );
cb = op->o_callback;
op->o_callback = ≻
rs->sr_err = syncprov_findbase( op, &fc );
op->o_callback = cb;
+ ldap_pvt_thread_mutex_destroy( &so.s_mutex );
if ( rs->sr_err != LDAP_SUCCESS ) {
send_ldap_result( op, rs );