]> git.sur5r.net Git - openldap/commitdiff
Import debug trace UNKNOWN_PREFIX ('?') change
authorKurt Zeilenga <kurt@openldap.org>
Mon, 28 Dec 1998 18:38:23 +0000 (18:38 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 28 Dec 1998 18:38:23 +0000 (18:38 +0000)
CHANGES
servers/slapd/back-ldbm/back-ldbm.h
servers/slapd/back-ldbm/index.c
servers/slapd/back-ldbm/search.c

diff --git a/CHANGES b/CHANGES
index a5b5beaa4a09da1e33e24ee07d2f5645cfe13f35..afad6dfb2daf7662a05702e22b638efa65335a57 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,7 @@ Changes included in OpenLDAP 1.1.x
        CVS Tag: OPENLDAP_REL_ENG_1_1
        Fixed misc. overlapping strcpy bugs
        Fixed misc. memory leaks
+       Fixed slapd/back-ldbm/search matched initialization bug
 
 Changes included in OpenLDAP 1.1.1
        CVS Tag: OPENLDAP_REL_ENG_1_1_1
index 960d2e1d4e0e4cc24958502150792a635f528a87..c85df113672c2ebec3e6afb71e66c4dff854d61d 100644 (file)
@@ -29,6 +29,8 @@ LDAP_BEGIN_DECL
 #define SUB_PREFIX     '*'     /* prefix for substring keys    */
 #define CONT_PREFIX    '\\'    /* prefix for continuation keys */
 
+#define UNKNOWN_PREFIX '?'     /* prefix for unknown keys    */
+
 #define DEFAULT_BLOCKSIZE      8192
 
 /*
index acb7844e8e9d6641d2c83cdec8deea136716228e..5965ecf0eb45395cff58d875ddef6f7d97f23bdf 100644 (file)
@@ -127,7 +127,7 @@ index_read(
 
        realval = val;
        tmpval = NULL;
-       if ( prefix != '\0' ) {
+       if ( prefix != UNKNOWN_PREFIX ) {
               unsigned int     len = strlen( val );
 
               if ( (len + 2) < sizeof(buf) ) {
@@ -183,7 +183,7 @@ add_value(
        realval = val;
        tmpval = NULL;
        idl = NULL;
-       if ( prefix != '\0' ) {
+       if ( prefix != UNKNOWN_PREFIX ) {
               unsigned int     len = strlen( val );
 
               if ( (len + 2) < sizeof(buf) ) {
@@ -357,7 +357,7 @@ index2prefix( int indextype )
                prefix = SUB_PREFIX;
                break;
        default:
-               prefix = '\0';
+               prefix = UNKNOWN_PREFIX;
                break;
        }
 
index 0b488c00041a33e748dc0cb450cde7a5faf17de8..6ecf5b4abe5b02cdca58ee9f3fe51151dfdcad5f 100644 (file)
@@ -87,7 +87,7 @@ ldbm_back_search(
 
        (void) dn_normalize (realBase);
 
-       Debug( LDAP_DEBUG_TRACE, "using base %s\n",
+       Debug( LDAP_DEBUG_TRACE, "using base \"%s\"\n",
                realBase, 0, 0 );
 
        switch ( scope ) {
@@ -323,7 +323,7 @@ base_candidates(
        IDList          *idl;
        Entry           *e;
 
-       Debug(LDAP_DEBUG_TRACE, "base_candidates: base: %s\n", base, 0, 0);
+       Debug(LDAP_DEBUG_TRACE, "base_candidates: base: \"%s\"\n", base, 0, 0);
 
        *err = LDAP_SUCCESS;
 
@@ -364,7 +364,7 @@ onelevel_candidates(
        char            buf[20];
        IDList          *candidates;
 
-       Debug(LDAP_DEBUG_TRACE, "onelevel_candidates: base: %s\n", base, 0, 0);
+       Debug(LDAP_DEBUG_TRACE, "onelevel_candidates: base: \"%s\"\n", base, 0, 0);
 
        *err = LDAP_SUCCESS;
        e = NULL;
@@ -425,8 +425,8 @@ subtree_candidates(
        Filter          *f, **filterarg_ptr;
        IDList          *candidates;
 
-       Debug(LDAP_DEBUG_TRACE, "subtree_candidates: base: %s\n",
-               base ? base : "NULL", 0, 0);
+       Debug(LDAP_DEBUG_TRACE, "subtree_candidates: base: \"%s\" %s\n",
+               base ? base : "NULL", lookupbase ? "lookupbase" : "", 0);
 
        /*
         * get the base object - unless we already have it (from one-level).