From: Kurt Zeilenga Date: Mon, 28 Dec 1998 18:38:23 +0000 (+0000) Subject: Import debug trace UNKNOWN_PREFIX ('?') change X-Git-Tag: OPENLDAP_REL_ENG_1_1_2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33c6efcf30dec3c6b62a1c41dc590d378ac32995;p=thirdparty%2Fopenldap.git Import debug trace UNKNOWN_PREFIX ('?') change --- diff --git a/CHANGES b/CHANGES index a5b5beaa4a..afad6dfb2d 100644 --- 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 diff --git a/servers/slapd/back-ldbm/back-ldbm.h b/servers/slapd/back-ldbm/back-ldbm.h index 960d2e1d4e..c85df11367 100644 --- a/servers/slapd/back-ldbm/back-ldbm.h +++ b/servers/slapd/back-ldbm/back-ldbm.h @@ -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 /* diff --git a/servers/slapd/back-ldbm/index.c b/servers/slapd/back-ldbm/index.c index acb7844e8e..5965ecf0eb 100644 --- a/servers/slapd/back-ldbm/index.c +++ b/servers/slapd/back-ldbm/index.c @@ -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; } diff --git a/servers/slapd/back-ldbm/search.c b/servers/slapd/back-ldbm/search.c index 0b488c0004..6ecf5b4abe 100644 --- a/servers/slapd/back-ldbm/search.c +++ b/servers/slapd/back-ldbm/search.c @@ -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).