]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Revert "registry: change registry_init_basic() to return WERROR instead of bool"
authorMichael Adam <obnox@samba.org>
Thu, 8 May 2008 15:43:59 +0000 (17:43 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 8 May 2008 15:43:59 +0000 (17:43 +0200)
This reverts commit 6a31e659cb371395dff0906786f3c6ef0cc2b3de.

source/libgpo/gpo_reg.c
source/registry/reg_init_basic.c
source/utils/net_registry.c

index de4a7937ecf7db7bc20c539a8f4b583aa7891a14..80639b86c5d704f7d65b26945d8043866626df52 100644 (file)
@@ -60,9 +60,8 @@ WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx,
                return WERR_INVALID_PARAM;
        }
 
-       werr = registry_init_basic();
-       if (!W_ERROR_IS_OK(werr)) {
-               return werr;
+       if (!registry_init_basic()) {
+               return WERR_CAN_NOT_COMPLETE;
        }
 
        tmp_ctx = TALLOC_ZERO_P(mem_ctx, struct gp_registry_context);
index cdf172c2899b5e50ca5d7553790bf829fba8214d..72ab9d1e655f7c32e85105ef15c57dcd5193bc84 100644 (file)
@@ -22,7 +22,7 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
 
-WERROR registry_init_basic(void)
+bool registry_init_basic(void)
 {
        WERROR werr;
 
@@ -32,16 +32,16 @@ WERROR registry_init_basic(void)
        if (!W_ERROR_IS_OK(werr)) {
                DEBUG(1, ("Failed to initialize the registry: %s\n",
                          dos_errstr(werr)));
-               goto done;
+               return false;
        }
+       regdb_close();
 
        werr = reghook_cache_init();
        if (!W_ERROR_IS_OK(werr)) {
                DEBUG(1, ("Failed to initialize the reghook cache: %s\n",
                          dos_errstr(werr)));
+               return false;
        }
 
-done:
-       regdb_close();
-       return werr;
+       return true;
 }
index 94a7d2d3594c4b55e9bd6bb6a79690b9bd356e52..421db6efbfeccd3d699f262c07724b09b993d4c2 100644 (file)
@@ -473,7 +473,7 @@ int net_registry(int argc, const char **argv)
        { NULL, NULL, NULL }
        };
 
-       if (!W_ERROR_IS_OK(registry_init_basic())) {
+       if (!registry_init_basic()) {
                return -1;
        }