diff options
Diffstat (limited to 'source4/lib/registry/common/reg_interface.c')
-rw-r--r-- | source4/lib/registry/common/reg_interface.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/lib/registry/common/reg_interface.c b/source4/lib/registry/common/reg_interface.c index 5753de1bca..fdbb7345d2 100644 --- a/source4/lib/registry/common/reg_interface.c +++ b/source4/lib/registry/common/reg_interface.c @@ -187,7 +187,12 @@ WERROR reg_key_get_value_by_index(REG_KEY *key, int idx, REG_VAL **val) { if(!key) return WERR_INVALID_PARAM; - if(!key->handle->functions->get_value_by_index) { + if(key->handle->functions->get_value_by_index) { + WERROR status = key->handle->functions->get_value_by_index(key, idx, val); + if(!W_ERROR_IS_OK(status)) + return status; + + } else if(key->handle->functions->fetch_values) { if(!key->cache_values) key->handle->functions->fetch_values(key, &key->cache_values_count, &key->cache_values); @@ -197,9 +202,7 @@ WERROR reg_key_get_value_by_index(REG_KEY *key, int idx, REG_VAL **val) return WERR_NO_MORE_ITEMS; } } else { - WERROR status = key->handle->functions->get_value_by_index(key, idx, val); - if(!W_ERROR_IS_OK(status)) - return status; + return WERR_NOT_SUPPORTED; } (*val)->parent = key; |