return WERR_INVALID_PARAM;
}
- if (!registry_init_basic()) {
- return WERR_CAN_NOT_COMPLETE;
+ werr = registry_init_basic();
+ if (!W_ERROR_IS_OK(werr)) {
+ return werr;
}
tmp_ctx = TALLOC_ZERO_P(mem_ctx, struct gp_registry_context);
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
-bool registry_init_basic(void)
+WERROR registry_init_basic(void)
{
WERROR werr;
if (!W_ERROR_IS_OK(werr)) {
DEBUG(1, ("Failed to initialize the registry: %s\n",
dos_errstr(werr)));
- return false;
+ goto done;
}
- 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;
}
- return true;
+done:
+ regdb_close();
+ return werr;
}