From: Pierangelo Masarati Date: Thu, 3 Jan 2002 16:28:21 +0000 (+0000) Subject: trivial fixes X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~317 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3e230c7f913cefbbbe422c0fbe86fa4bf2241013;p=openldap trivial fixes --- diff --git a/servers/slapd/back-ldap/add.c b/servers/slapd/back-ldap/add.c index d7e145d8b7..465d800f4e 100644 --- a/servers/slapd/back-ldap/add.c +++ b/servers/slapd/back-ldap/add.c @@ -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, diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index f05ed507a6..378a3c621d 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -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 */