From: Luke Howard Date: Mon, 25 Jul 2005 10:06:03 +0000 (+0000) Subject: more SLAPI cleanups X-Git-Tag: OPENLDAP_AC_BP~214 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ddbbbe2348e06fb91e22cd0a1f074cff6b4488f4;p=openldap more SLAPI cleanups --- diff --git a/servers/slapd/slapi/slapi_ext.c b/servers/slapd/slapi/slapi_ext.c index 38e29bcd5c..87a7db15c4 100644 --- a/servers/slapd/slapi/slapi_ext.c +++ b/servers/slapd/slapi/slapi_ext.c @@ -131,7 +131,6 @@ static void free_extension(struct slapi_extension_block *eblock, int objecttype, eblock->extensions[extensionhandle] = NULL; } } -#endif /* LDAP_SLAPI */ void *slapi_get_object_extension(int objecttype, void *object, int extensionhandle) { diff --git a/servers/slapd/slapi/slapi_ops.c b/servers/slapd/slapi/slapi_ops.c index c830aa5075..ae6dcb3b32 100644 --- a/servers/slapd/slapi/slapi_ops.c +++ b/servers/slapd/slapi/slapi_ops.c @@ -293,9 +293,10 @@ slapi_int_set_operation_dn( Slapi_PBlock *pb ) if ( BER_BVISNULL( &op->o_ndn ) ) { /* set to root DN */ be = select_backend( &op->o_req_ndn, 0, 0 ); - assert( be != NULL ); - ber_dupbv( &op->o_dn, &be->be_rootdn ); - ber_dupbv( &op->o_ndn, &be->be_rootndn ); + if ( be != NULL ) { + ber_dupbv( &op->o_dn, &be->be_rootdn ); + ber_dupbv( &op->o_ndn, &be->be_rootndn ); + } } } @@ -384,9 +385,7 @@ slapi_int_func_internal_pb( Slapi_PBlock *pb, slap_operation_t which ) func = &pb->pop->o_bd->be_bind; - rc = func[which]( pb->pop, &pb->rs ); - - return rc; + return func[which]( pb->pop, &pb->rs ); } int diff --git a/servers/slapd/slapi/slapi_overlay.c b/servers/slapd/slapi/slapi_overlay.c index d57a2173a0..1cc39940af 100644 --- a/servers/slapd/slapi/slapi_overlay.c +++ b/servers/slapd/slapi/slapi_overlay.c @@ -36,20 +36,16 @@ static int slapi_over_response( Operation *op, SlapReply *rs ); static int slapi_over_cleanup( Operation *op, SlapReply *rs ); static Slapi_PBlock * -slapi_over_pblock_new ( Operation *op ) +slapi_over_pblock_new( Operation *op ) { Slapi_PBlock *pb; pb = slapi_pblock_new(); - if ( pb == NULL ) { - return NULL; - } - pb->pop = op; pb->pconn = op->o_conn; pb->internal_op = 0; - PBLOCK_ASSERT_OP( pb, 0 ); + PBLOCK_ASSERT_OP( pb, op->o_tag ); return pb; }