]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
import fix to ITS#3698
authorPierangelo Masarati <ando@openldap.org>
Wed, 4 May 2005 11:17:41 +0000 (11:17 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 4 May 2005 11:17:41 +0000 (11:17 +0000)
CHANGES
servers/slapd/back-ldap/map.c
servers/slapd/back-ldap/suffixmassage.c

diff --git a/CHANGES b/CHANGES
index 2e352c681595a5f7e1f1e06b0363cb903af16543..60381c97bcebe4b46b2770ea075f999d92c7cbc5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
 OpenLDAP 2.2 Change Log
 
 OpenLDAP 2.2.27 Engineering
+       Fixed back-ldap/back-meta debug output of NULL strings (ITS#3698)
        Fixed syncrepl runqueue (ITS#3542)
        Fixed ACL val default style parsing crasher (ITS#3700)
        Build Environment
index 1300cafba1bcabee9e06a4bf3b39a6efd592923e..da478356079d84008c0759e535cfc480e9a698b1 100644 (file)
@@ -511,11 +511,15 @@ ldap_back_filter_map_rewrite(
 #ifdef NEW_LOGGING
                LDAP_LOG( BACK_LDAP, DETAIL1, 
                        "[rw] %s: \"%s\" -> \"%s\"\n",
-                       dc->ctx, ftmp.bv_val, fstr->bv_val );           
+                       dc->ctx,
+                       BER_BVISNULL( &ftmp ) ? "" : ftmp.bv_val,
+                       BER_BVISNULL( fstr ) ? "" : fstr->bv_val );             
 #else /* !NEW_LOGGING */
                Debug( LDAP_DEBUG_ARGS,
                        "[rw] %s: \"%s\" -> \"%s\"\n",
-                       dc->ctx, ftmp.bv_val, fstr->bv_val );           
+                       dc->ctx,
+                       BER_BVISNULL( &ftmp ) ? "" : ftmp.bv_val,
+                       BER_BVISNULL( fstr ) ? "" : fstr->bv_val );             
 #endif /* !NEW_LOGGING */
                rc = LDAP_SUCCESS;
                break;
index eb093407723c3b3878e4399c23806c959bca84ae..7f4ca5cc96b3217407fe713d811cabe2f2f6f552 100644 (file)
@@ -56,11 +56,15 @@ ldap_back_dn_massage(
 #ifdef NEW_LOGGING
                LDAP_LOG( BACK_LDAP, DETAIL1, 
                        "[rw] %s: \"%s\" -> \"%s\"\n",
-                       dc->ctx, dn->bv_val, res->bv_val );             
+                       dc->ctx,
+                       BER_BVISNULL( dn ) ? "" : dn->bv_val,
+                       BER_BVISNULL( res ) ? "" : res->bv_val );               
 #else /* !NEW_LOGGING */
                Debug( LDAP_DEBUG_ARGS,
                        "[rw] %s: \"%s\" -> \"%s\"\n",
-                       dc->ctx, dn->bv_val, res->bv_val );             
+                       dc->ctx,
+                       BER_BVISNULL( dn ) ? "" : dn->bv_val,
+                       BER_BVISNULL( res ) ? "" : res->bv_val );               
 #endif /* !NEW_LOGGING */
                rc = LDAP_SUCCESS;
                break;
@@ -148,12 +152,14 @@ ldap_back_dn_massage(
 #ifdef NEW_LOGGING
                        LDAP_LOG ( BACK_LDAP, ARGS, 
                                "ldap_back_dn_massage: converted \"%s\" to \"%s\"\n",
-                               dn->bv_val, res->bv_val, 0 );
+                               BER_BVISNULL( dn ) ? "" : dn->bv_val,
+                               BER_BVISNULL( res ) ? "" : res->bv_val, 0 );
 #else
                        Debug( LDAP_DEBUG_ARGS,
                                "ldap_back_dn_massage:"
                                " converted \"%s\" to \"%s\"\n",
-                               dn->bv_val, res->bv_val, 0 );
+                               BER_BVISNULL( dn ) ? "" : dn->bv_val,
+                               BER_BVISNULL( res ) ? "" : res->bv_val, 0 );
 #endif
                        break;
                }