]> git.sur5r.net Git - openldap/commitdiff
more SLAPI cleanups
authorLuke Howard <lukeh@openldap.org>
Mon, 25 Jul 2005 10:06:03 +0000 (10:06 +0000)
committerLuke Howard <lukeh@openldap.org>
Mon, 25 Jul 2005 10:06:03 +0000 (10:06 +0000)
servers/slapd/slapi/slapi_ext.c
servers/slapd/slapi/slapi_ops.c
servers/slapd/slapi/slapi_overlay.c

index 38e29bcd5cfd5492d0e64f408ccbfb88026d1c30..87a7db15c4516c3a557d14fa91bb8f3609b9d6e3 100644 (file)
@@ -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)
 {
index c830aa5075ebfd0a4d0d6dfc56d0cb156c4fe80c..ae6dcb3b3237353b75c2f69c82c95bfdf2664bcf 100644 (file)
@@ -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
index d57a2173a0e11bf7204fad56a4a085d76fd9582b..1cc39940af04e837085c9ee0dbb3ae1c9cb39af6 100644 (file)
@@ -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;
 }