diff options
author | Andreas Schneider <asn@samba.org> | 2011-04-11 17:24:13 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-05-10 19:13:22 +0200 |
commit | e1f0b91c5fd6b11e258464994868be8020c89e89 (patch) | |
tree | 848b06e55c7f5a9102213bf0407100ba8fdaed18 /source3/lib/smbconf | |
parent | 72d15f0c03cd67d32feb51f41238401b38344907 (diff) | |
download | samba-e1f0b91c5fd6b11e258464994868be8020c89e89.tar.gz samba-e1f0b91c5fd6b11e258464994868be8020c89e89.tar.bz2 samba-e1f0b91c5fd6b11e258464994868be8020c89e89.zip |
libsmbconf: Convert smbconf_transaction_*() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/lib/smbconf')
-rw-r--r-- | source3/lib/smbconf/smbconf_reg.c | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c index eb6db29f5c..6982795c73 100644 --- a/source3/lib/smbconf/smbconf_reg.c +++ b/source3/lib/smbconf/smbconf_reg.c @@ -1167,19 +1167,40 @@ done: return err; } -static WERROR smbconf_reg_transaction_start(struct smbconf_ctx *ctx) +static sbcErr smbconf_reg_transaction_start(struct smbconf_ctx *ctx) { - return regdb_transaction_start(); + WERROR werr; + + werr = regdb_transaction_start(); + if (!W_ERROR_IS_OK(werr)) { + return SBC_ERR_IO_FAILURE; + } + + return SBC_ERR_OK; } -static WERROR smbconf_reg_transaction_commit(struct smbconf_ctx *ctx) +static sbcErr smbconf_reg_transaction_commit(struct smbconf_ctx *ctx) { - return regdb_transaction_commit(); + WERROR werr; + + werr = regdb_transaction_commit(); + if (!W_ERROR_IS_OK(werr)) { + return SBC_ERR_IO_FAILURE; + } + + return SBC_ERR_OK; } -static WERROR smbconf_reg_transaction_cancel(struct smbconf_ctx *ctx) +static sbcErr smbconf_reg_transaction_cancel(struct smbconf_ctx *ctx) { - return regdb_transaction_cancel(); + WERROR werr; + + werr = regdb_transaction_cancel(); + if (!W_ERROR_IS_OK(werr)) { + return SBC_ERR_IO_FAILURE; + } + + return SBC_ERR_OK; } struct smbconf_ops smbconf_ops_reg = { |