1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-31 20:22:15 +03:00

libsmbconf: Convert smbconf_drop() to sbcErr.

Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Andreas Schneider
2011-04-08 10:40:02 +02:00
committed by Michael Adam
parent 9082c7cee8
commit 720ba8e7e7
6 changed files with 22 additions and 17 deletions

View File

@ -393,8 +393,7 @@ static int net_conf_import(struct net_context *c, struct smbconf_ctx *conf_ctx,
goto cancel;
}
if (!c->opt_testmode) {
werr = smbconf_drop(conf_ctx);
if (!W_ERROR_IS_OK(werr)) {
if (!SBC_ERROR_IS_OK(smbconf_drop(conf_ctx))) {
goto cancel;
}
}
@ -502,17 +501,17 @@ static int net_conf_drop(struct net_context *c, struct smbconf_ctx *conf_ctx,
int argc, const char **argv)
{
int ret = -1;
WERROR werr;
sbcErr err;
if (argc != 0 || c->display_usage) {
net_conf_drop_usage(c, argc, argv);
goto done;
}
werr = smbconf_drop(conf_ctx);
if (!W_ERROR_IS_OK(werr)) {
err = smbconf_drop(conf_ctx);
if (!SBC_ERROR_IS_OK(err)) {
d_fprintf(stderr, _("Error deleting configuration: %s\n"),
win_errstr(werr));
sbcErrorString(err));
goto done;
}