mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
registry: change registry_init_basic() to return WERROR instead of bool
Michael
This commit is contained in:
parent
e65a999989
commit
6a31e659cb
@ -60,8 +60,9 @@ WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx,
|
|||||||
return WERR_INVALID_PARAM;
|
return WERR_INVALID_PARAM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!registry_init_basic()) {
|
werr = registry_init_basic();
|
||||||
return WERR_CAN_NOT_COMPLETE;
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
|
return werr;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp_ctx = TALLOC_ZERO_P(mem_ctx, struct gp_registry_context);
|
tmp_ctx = TALLOC_ZERO_P(mem_ctx, struct gp_registry_context);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#undef DBGC_CLASS
|
#undef DBGC_CLASS
|
||||||
#define DBGC_CLASS DBGC_REGISTRY
|
#define DBGC_CLASS DBGC_REGISTRY
|
||||||
|
|
||||||
bool registry_init_basic(void)
|
WERROR registry_init_basic(void)
|
||||||
{
|
{
|
||||||
WERROR werr;
|
WERROR werr;
|
||||||
|
|
||||||
@ -32,16 +32,16 @@ bool registry_init_basic(void)
|
|||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(1, ("Failed to initialize the registry: %s\n",
|
DEBUG(1, ("Failed to initialize the registry: %s\n",
|
||||||
dos_errstr(werr)));
|
dos_errstr(werr)));
|
||||||
return false;
|
goto done;
|
||||||
}
|
}
|
||||||
regdb_close();
|
|
||||||
|
|
||||||
werr = reghook_cache_init();
|
werr = reghook_cache_init();
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(1, ("Failed to initialize the reghook cache: %s\n",
|
DEBUG(1, ("Failed to initialize the reghook cache: %s\n",
|
||||||
dos_errstr(werr)));
|
dos_errstr(werr)));
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
done:
|
||||||
|
regdb_close();
|
||||||
|
return werr;
|
||||||
}
|
}
|
||||||
|
@ -473,7 +473,7 @@ int net_registry(int argc, const char **argv)
|
|||||||
{ NULL, NULL, NULL }
|
{ NULL, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!registry_init_basic()) {
|
if (!W_ERROR_IS_OK(registry_init_basic())) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user