From d911bafea695dc36d7952bd265dfe15a3e04ac7b Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 11 Apr 2011 15:14:52 +0200 Subject: libsmbconf: Convert smbconf_set_includes() to sbcErr. Signed-off-by: Michael Adam --- source3/utils/net_conf.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c index d3c39fdb74..255f14c920 100644 --- a/source3/utils/net_conf.c +++ b/source3/utils/net_conf.c @@ -246,9 +246,14 @@ static WERROR import_process_service(struct net_context *c, } } - werr = smbconf_set_includes(conf_ctx, service->name, num_includes, - (const char **)includes); + err = smbconf_set_includes(conf_ctx, service->name, num_includes, + (const char **)includes); + if (!SBC_ERROR_IS_OK(err)) { + werr = WERR_NOMEM; + goto done; + } + werr = WERR_OK; done: TALLOC_FREE(mem_ctx); return werr; @@ -1055,7 +1060,7 @@ static int net_conf_setincludes(struct net_context *c, struct smbconf_ctx *conf_ctx, int argc, const char **argv) { - WERROR werr; + sbcErr err; char *service; uint32_t num_includes; const char **includes; @@ -1080,9 +1085,9 @@ static int net_conf_setincludes(struct net_context *c, includes = argv + 1; } - werr = smbconf_set_includes(conf_ctx, service, num_includes, includes); - if (!W_ERROR_IS_OK(werr)) { - d_printf(_("error setting includes: %s\n"), win_errstr(werr)); + err = smbconf_set_includes(conf_ctx, service, num_includes, includes); + if (!SBC_ERROR_IS_OK(err)) { + d_printf(_("error setting includes: %s\n"), sbcErrorString(err)); goto done; } -- cgit