]> git.sur5r.net Git - openldap/commitdiff
trivial fixes
authorPierangelo Masarati <ando@openldap.org>
Thu, 3 Jan 2002 16:28:21 +0000 (16:28 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 3 Jan 2002 16:28:21 +0000 (16:28 +0000)
servers/slapd/back-ldap/add.c
servers/slapd/back-ldap/search.c

index d7e145d8b754dd1cad210a2304ace365d612ae8d..465d800f4eae2eb6ce352bf29998a552b6394248 100644 (file)
@@ -79,8 +79,10 @@ ldap_back_add(
 #ifdef ENABLE_REWRITE
        switch (rewrite_session( li->rwinfo, "addDn", e->e_dn, conn, &mdn.bv_val )) {
        case REWRITE_REGEXEC_OK:
-               if ( mdn.bv_val == NULL ) {
-                       mdn.bv_val = e->e_dn;
+               if ( mdn.bv_val != NULL && mdn.bv_val[ 0 ] != '\0' ) {
+                       mdn.bv_len = strlen( mdn.bv_val );
+               } else {
+                       mdn = e->e_name;
                }
 #ifdef NEW_LOGGING
                LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
index f05ed507a6667811989b97b70863a7d4f68caf83..378a3c621dc5b8e4fedb9a866fb9ddb319c1a990 100644 (file)
@@ -437,11 +437,11 @@ ldap_send_entry(
                                        != LDAP_SUCCESS) {
 #ifdef NEW_LOGGING
                                LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
-                                               "slap_str2undef_ad(%s): "
+                                               "slap_bv2undef_ad(%s):  "
                                                "%s\n", mapped.bv_val, text ));
 #else /* !NEW_LOGGING */
                                Debug( LDAP_DEBUG_ANY, 
-                                               "slap_str2undef_ad(%s): "
+                                               "slap_bv2undef_ad(%s):  "
                                                "%s\n%s", mapped.bv_val, text, "" );
 #endif /* !NEW_LOGGING */