mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-17 14:00:30 +08:00
Improve readability of base output in debugging.
Also, output UNKNOWN_PREFIX ('?') instead of writing a nul character when the attribute prefix is unknown.
This commit is contained in:
parent
97f10a99cc
commit
dacc0bfc7d
@ -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
|
||||
|
||||
/*
|
||||
|
@ -129,7 +129,7 @@ index_read(
|
||||
|
||||
realval = val;
|
||||
tmpval = NULL;
|
||||
if ( prefix != '\0' ) {
|
||||
if ( prefix != UNKNOWN_PREFIX ) {
|
||||
unsigned int len = strlen( val );
|
||||
|
||||
if ( (len + 2) < sizeof(buf) ) {
|
||||
@ -185,7 +185,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) ) {
|
||||
@ -359,7 +359,7 @@ index2prefix( int indextype )
|
||||
prefix = SUB_PREFIX;
|
||||
break;
|
||||
default:
|
||||
prefix = '\0';
|
||||
prefix = UNKNOWN_PREFIX;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -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).
|
||||
|
Loading…
Reference in New Issue
Block a user