diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-11-27 07:41:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:16:08 -0500 |
commit | b189e6d76edc5e2080f9b7f29aae07cde7aa6308 (patch) | |
tree | c77c47435ea55b3ea2d89fefbe0aa7f2e6362862 /source3/registry | |
parent | 2685e167fa12d696bf3882e888629f95b81e7683 (diff) | |
download | samba-b189e6d76edc5e2080f9b7f29aae07cde7aa6308.tar.gz samba-b189e6d76edc5e2080f9b7f29aae07cde7aa6308.tar.bz2 samba-b189e6d76edc5e2080f9b7f29aae07cde7aa6308.zip |
r19912: Move the subkey cache to srv_winreg_nt.c
(This used to be commit 01a53590a6325413551016effe302585a3a1e656)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_frontend.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index b361359985..5a76e36c81 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -185,63 +185,6 @@ int fetch_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkey_ctr ) } /*********************************************************************** - retreive a specific subkey specified by index. Caller is - responsible for freeing memory - ***********************************************************************/ - -BOOL fetch_reg_keys_specific( REGISTRY_KEY *key, char** subkey, uint32 key_index ) -{ - static REGSUBKEY_CTR *ctr = NULL; - static pstring save_path; - char *s; - - *subkey = NULL; - - /* simple caching for performance; very basic heuristic */ - - DEBUG(8,("fetch_reg_keys_specific: Looking for key [%d] of [%s]\n", key_index, key->name)); - - if ( !ctr ) { - DEBUG(8,("fetch_reg_keys_specific: Initializing cache of subkeys for [%s]\n", key->name)); - - if ( !(ctr = TALLOC_ZERO_P( NULL, REGSUBKEY_CTR )) ) { - DEBUG(0,("fetch_reg_keys_specific: talloc() failed!\n")); - return False; - } - - pstrcpy( save_path, key->name ); - - if ( fetch_reg_keys( key, ctr) == -1 ) - return False; - - } - /* clear the cache when key_index == 0 or the path has changed */ - else if ( !key_index || StrCaseCmp( save_path, key->name) ) { - - DEBUG(8,("fetch_reg_keys_specific: Updating cache of subkeys for [%s]\n", key->name)); - - TALLOC_FREE( ctr ); - - if ( !(ctr = TALLOC_ZERO_P( NULL, REGSUBKEY_CTR )) ) { - DEBUG(0,("fetch_reg_keys_specific: talloc() failed!\n")); - return False; - } - - pstrcpy( save_path, key->name ); - - if ( fetch_reg_keys( key, ctr) == -1 ) - return False; - } - - if ( !(s = regsubkey_ctr_specific_key( ctr, key_index )) ) - return False; - - *subkey = SMB_STRDUP( s ); - - return True; -} - -/*********************************************************************** High level wrapper function for enumerating registry values ***********************************************************************/ |