static BI_op_func *opfun[] = {
do_bind,
do_unbind,
+ do_search,
+ do_compare,
+ do_modify,
+ do_modrdn,
do_add,
do_delete,
- do_modrdn,
- do_modify,
- do_compare,
- do_search,
do_abandon,
do_extended,
NULL
ldap_pvt_thread_start_t *func,
void *arg )
{
- int rc;
Connection *c;
c = connection_init( s, (Listener *)&dummy_list, "", "",
}
#ifdef DATA_READY_LOOP
while( !rc && ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_DATA_READY, NULL ));
-#elif CONNECTION_INPUT_LOOP
+#elif defined CONNECTION_INPUT_LOOP
while(!rc);
#else
while(0);
/* log authorization identity */
Statslog( LDAP_DEBUG_STATS,
- "%s BIND dn=\"%s\" mech=%s ssf=%d\n",
+ "%s BIND dn=\"%s\" mech=%s sasl_ssf=%d ssf=%d\n",
op->o_log_prefix,
BER_BVISNULL( &op->o_conn->c_dn ) ? "<empty>" : op->o_conn->c_dn.bv_val,
- op->o_conn->c_authmech.bv_val, op->orb_ssf, 0 );
+ op->o_conn->c_authmech.bv_val,
+ op->orb_ssf, op->o_conn->c_ssf );
Debug( LDAP_DEBUG_TRACE,
- "do_bind: SASL/%s bind: dn=\"%s\" ssf=%d\n",
+ "do_bind: SASL/%s bind: dn=\"%s\" sasl_ssf=%d\n",
op->o_conn->c_authmech.bv_val,
BER_BVISNULL( &op->o_conn->c_dn ) ? "<empty>" : op->o_conn->c_dn.bv_val,
op->orb_ssf );
void
connection_fake_init(
Connection *conn,
- Operation *op,
+ OperationBuffer *opbuf,
void *ctx )
{
- connection_fake_init2( conn, op, ctx, 1 );
+ connection_fake_init2( conn, opbuf, ctx, 1 );
}
void
connection_fake_init2(
Connection *conn,
- Operation *op,
+ OperationBuffer *opbuf,
void *ctx,
int newmem )
{
+ Operation *op = (Operation *) opbuf;
+
conn->c_connid = -1;
conn->c_send_ldap_result = slap_send_ldap_result;
conn->c_send_search_entry = slap_send_search_entry;
conn->c_peer_domain = slap_empty_bv;
conn->c_peer_name = slap_empty_bv;
- memset(op, 0, OPERATION_BUFFER_SIZE);
- op->o_hdr = (Opheader *)(op+1);
- op->o_controls = (void **)(op->o_hdr+1);
+ memset( opbuf, 0, sizeof( *opbuf ));
+ op->o_hdr = &opbuf->ob_hdr;
+ op->o_controls = opbuf->ob_controls;
+
/* set memory context */
op->o_tmpmemctx = slap_sl_mem_create(SLAP_SLAB_SIZE, SLAP_SLAB_STACK, ctx,
newmem );
#ifdef LDAP_SLAPI
if ( slapi_plugins_used ) {
- conn_fake_extblock *eb = NULL;
+ conn_fake_extblock *eb;
+ void *ebx = NULL;
/* Use thread keys to make sure these eventually get cleaned up */
- if ( ldap_pvt_thread_pool_getkey( ctx, connection_fake_init, &eb,
+ if ( ldap_pvt_thread_pool_getkey( ctx, connection_fake_init, &ebx,
NULL )) {
eb = ch_malloc( sizeof( *eb ));
slapi_int_create_object_extensions( SLAPI_X_EXT_CONNECTION, conn );
ldap_pvt_thread_pool_setkey( ctx, connection_fake_init, eb,
connection_fake_destroy );
} else {
+ eb = ebx;
conn->c_extensions = eb->eb_conn;
op->o_hdr->oh_extensions = eb->eb_op;
}