diff options
author | Gerald Carter <jerry@samba.org> | 2002-07-20 02:42:04 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-07-20 02:42:04 +0000 |
commit | 39bbeff5b361ffa6a5ff9273cf7fce5f46543703 (patch) | |
tree | fd091e5a4bb4ed90a6aafa8c22721a0c61e4be5f /source3/registry | |
parent | 3c0a9c46d8057b9499d7d48a67ba15f9942d558a (diff) | |
download | samba-39bbeff5b361ffa6a5ff9273cf7fce5f46543703.tar.gz samba-39bbeff5b361ffa6a5ff9273cf7fce5f46543703.tar.bz2 samba-39bbeff5b361ffa6a5ff9273cf7fce5f46543703.zip |
fixed a logic error in the sorted_tree_find_child() routine
that caused a valid search to fail. The printing registry
view now works again.
(This used to be commit 2050859f03493d5135984ce1e42baf8f1f2566b9)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_cachehook.c | 4 | ||||
-rw-r--r-- | source3/registry/reg_frontend.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/source3/registry/reg_cachehook.c b/source3/registry/reg_cachehook.c index e2444d8d17..2139fa7066 100644 --- a/source3/registry/reg_cachehook.c +++ b/source3/registry/reg_cachehook.c @@ -74,6 +74,8 @@ REGISTRY_HOOK* reghook_cache_find( char *keyname ) if ( !keyname ) return NULL; + /* prepend the string with a '\' character */ + len = strlen( keyname ); if ( !(key = malloc( len + 2 )) ) { DEBUG(0,("reghook_cache_find: malloc failed for string [%s] !?!?!\n", @@ -84,6 +86,8 @@ REGISTRY_HOOK* reghook_cache_find( char *keyname ) *key = '\\'; strncpy( key+1, keyname, len+1); + /* swap to a form understood by the SORTED_TREE */ + string_sub( key, "\\", "/", 0 ); DEBUG(10,("reghook_cache_find: Searching for keyname [%s]\n", key)); diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index 6090245096..de2b279546 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -60,7 +60,8 @@ BOOL init_registry( void ) return False; } - reghook_dump_cache(20); + if ( DEBUGLEVEL >= 20 ) + reghook_dump_cache(20); return True; } |