diff options
author | Andreas Schneider <asn@samba.org> | 2011-04-11 13:23:26 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-05-10 19:13:21 +0200 |
commit | ddc28a683fcf036a279a0d3d7b23504364316fa6 (patch) | |
tree | 9b7f70351c2a22c1102092b54291e089ce725c28 /source3/utils | |
parent | fbd7626656d8d76f371e431005fbfa1228ba2029 (diff) | |
download | samba-ddc28a683fcf036a279a0d3d7b23504364316fa6.tar.gz samba-ddc28a683fcf036a279a0d3d7b23504364316fa6.tar.bz2 samba-ddc28a683fcf036a279a0d3d7b23504364316fa6.zip |
libsmbconf: Convert smbconf_set_parameter() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_conf.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c index 7e166e8e37..4be91e35a8 100644 --- a/source3/utils/net_conf.c +++ b/source3/utils/net_conf.c @@ -231,15 +231,16 @@ static WERROR import_process_service(struct net_context *c, } num_includes++; } else { - werr = smbconf_set_parameter(conf_ctx, + err = smbconf_set_parameter(conf_ctx, service->name, service->param_names[idx], service->param_values[idx]); - if (!W_ERROR_IS_OK(werr)) { + if (!SBC_ERROR_IS_OK(err)) { d_fprintf(stderr, _("Error in section [%s], parameter \"%s\": %s\n"), service->name, service->param_names[idx], - win_errstr(werr)); + sbcErrorString(err)); + werr = WERR_NOMEM; goto done; } } @@ -729,35 +730,35 @@ static int net_conf_addshare(struct net_context *c, * fill the share with parameters */ - werr = smbconf_set_parameter(conf_ctx, sharename, "path", path); - if (!W_ERROR_IS_OK(werr)) { + err = smbconf_set_parameter(conf_ctx, sharename, "path", path); + if (!SBC_ERROR_IS_OK(err)) { d_fprintf(stderr, _("Error setting parameter %s: %s\n"), - "path", win_errstr(werr)); + "path", sbcErrorString(err)); goto cancel; } if (comment != NULL) { - werr = smbconf_set_parameter(conf_ctx, sharename, "comment", - comment); - if (!W_ERROR_IS_OK(werr)) { + err = smbconf_set_parameter(conf_ctx, sharename, "comment", + comment); + if (!SBC_ERROR_IS_OK(err)) { d_fprintf(stderr, _("Error setting parameter %s: %s\n"), - "comment", win_errstr(werr)); + "comment", sbcErrorString(err)); goto cancel; } } - werr = smbconf_set_parameter(conf_ctx, sharename, "guest ok", guest_ok); - if (!W_ERROR_IS_OK(werr)) { + err = smbconf_set_parameter(conf_ctx, sharename, "guest ok", guest_ok); + if (!SBC_ERROR_IS_OK(err)) { d_fprintf(stderr, _("Error setting parameter %s: %s\n"), - "'guest ok'", win_errstr(werr)); + "'guest ok'", sbcErrorString(err)); goto cancel; } - werr = smbconf_set_parameter(conf_ctx, sharename, "writeable", - writeable); - if (!W_ERROR_IS_OK(werr)) { + err = smbconf_set_parameter(conf_ctx, sharename, "writeable", + writeable); + if (!SBC_ERROR_IS_OK(err)) { d_fprintf(stderr, _("Error setting parameter %s: %s\n"), - "writeable", win_errstr(werr)); + "writeable", sbcErrorString(err)); goto cancel; } @@ -868,11 +869,10 @@ static int net_conf_setparm(struct net_context *c, struct smbconf_ctx *conf_ctx, } } - werr = smbconf_set_parameter(conf_ctx, service, param, value_str); - - if (!W_ERROR_IS_OK(werr)) { + err = smbconf_set_parameter(conf_ctx, service, param, value_str); + if (!SBC_ERROR_IS_OK(err)) { d_fprintf(stderr, _("Error setting value '%s': %s\n"), - param, win_errstr(werr)); + param, sbcErrorString(err)); goto cancel; } |