diff options
author | Andreas Schneider <asn@samba.org> | 2011-04-11 15:14:52 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-05-10 19:13:22 +0200 |
commit | d911bafea695dc36d7952bd265dfe15a3e04ac7b (patch) | |
tree | cd30e1c56152f40de4340ab4e893970859d07ad4 /source3/utils | |
parent | 9f9711490ae743493722c997e316a31600ef02d6 (diff) | |
download | samba-d911bafea695dc36d7952bd265dfe15a3e04ac7b.tar.gz samba-d911bafea695dc36d7952bd265dfe15a3e04ac7b.tar.bz2 samba-d911bafea695dc36d7952bd265dfe15a3e04ac7b.zip |
libsmbconf: Convert smbconf_set_includes() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_conf.c | 17 |
1 files changed, 11 insertions, 6 deletions
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; } |