summaryrefslogtreecommitdiffstats
path: root/source3/utils/net_conf.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-04-11 13:23:26 +0200
committerMichael Adam <obnox@samba.org>2011-05-10 19:13:21 +0200
commitddc28a683fcf036a279a0d3d7b23504364316fa6 (patch)
tree9b7f70351c2a22c1102092b54291e089ce725c28 /source3/utils/net_conf.c
parentfbd7626656d8d76f371e431005fbfa1228ba2029 (diff)
downloadsamba-ddc28a683fcf036a279a0d3d7b23504364316fa6.tar.gz
samba-ddc28a683fcf036a279a0d3d7b23504364316fa6.tar.xz
samba-ddc28a683fcf036a279a0d3d7b23504364316fa6.zip
libsmbconf: Convert smbconf_set_parameter() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/utils/net_conf.c')
-rw-r--r--source3/utils/net_conf.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c
index 7e166e8e37a..4be91e35a8a 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;
}