]> git.sur5r.net Git - openldap/commitdiff
Fix referrals no-referrals case
authorKurt Zeilenga <kurt@openldap.org>
Wed, 27 Sep 2000 23:25:15 +0000 (23:25 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 27 Sep 2000 23:25:15 +0000 (23:25 +0000)
servers/slapd/back-bdb/Makefile.in
servers/slapd/back-bdb/referral.c

index 12af61da0c1f6b8ce574d8f6a559c8d3841da7e4..acf87952dc1a592b58babb3909a19eacb2528c16 100644 (file)
@@ -1,10 +1,12 @@
 # $OpenLDAP$
 
 SRCS = init.c tools.c config.c \
-       add.c bind.c compare.c delete.c search.c \
+       add.c bind.c compare.c delete.c modify.c modrdn.c search.c \
+       extended.c passwd.c referral.c \
        dn2entry.lo dn2id.c error.c id2entry.c idl.c nextid.c
 OBJS = init.lo tools.lo config.lo \
-       add.lo bind.lo compare.lo delete.lo search.lo \
+       add.lo bind.lo compare.lo delete.lo modify.lo modrdn.lo search.lo \
+       extended.lo passwd.lo referral.lo \
        dn2entry.lo dn2id.lo error.lo id2entry.lo idl.lo nextid.lo
 
 LDAP_INCDIR= ../../../include       
index f4e2a08c70266c2f45e995fd6ff684cab109ca7e..b969ce966f3acd07c2a9a1ac38824f9f8c6ce93d 100644 (file)
@@ -1,4 +1,4 @@
-/* referral.c - LDBM backend referral handler */
+/* referral.c - BDB backend referral handler */
 /* $OpenLDAP$ */
 /*
  * Copyright 2000 The OpenLDAP Foundation, All Rights Reserved.
@@ -23,7 +23,7 @@ bdb_referrals(
 {
        struct bdb_info *bdb = (struct bdb_info *) be->be_private;
        int rc = LDAP_SUCCESS;
-       Entry *e, *matched;
+       Entry *e = NULL, *matched;
 
        if( op->o_tag == LDAP_REQ_SEARCH ) {
                /* let search take care of itself */
@@ -43,6 +43,9 @@ bdb_referrals(
        case 0:
                break;
        default:
+               Debug( LDAP_DEBUG_TRACE,
+                       "bdb_referrals: dn2entry failed: %s (%d)\n",
+                       db_strerror(rc), rc, 0 ); 
                send_ldap_result( conn, op, rc=LDAP_OTHER,
                        NULL, "internal error", NULL, NULL );
                return rc;
@@ -56,7 +59,7 @@ bdb_referrals(
                        matched_dn = ch_strdup( matched->e_dn );
 
                        Debug( LDAP_DEBUG_TRACE,
-                               "ldbm_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
+                               "bdb_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
                                op->o_tag, dn, matched_dn );
 
                        refs = is_entry_referral( matched )
@@ -70,6 +73,8 @@ bdb_referrals(
                        /* send referrals */
                        send_ldap_result( conn, op, rc = LDAP_REFERRAL,
                                matched_dn, NULL, refs, NULL );
+               } else {
+                       rc = LDAP_SUCCESS;
                }
 
                if( matched != NULL ) {
@@ -86,7 +91,7 @@ bdb_referrals(
                        conn, op, e );
 
                Debug( LDAP_DEBUG_TRACE,
-                       "ldbm_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
+                       "bdb_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
                        op->o_tag, dn, e->e_dn );
 
                if( refs != NULL ) {