From 21d485184df986e1a123f70c689517386e51a5ce Mon Sep 17 00:00:00 2001 From: Michal Zidek Date: Thu, 16 Aug 2012 18:48:53 +0200 Subject: Unify usage of sysdb transactions Removing bad examples of usage of sysdb_transaction_start/commit/end functions and making it more consistent (all files except of src/db/sysdb_*.c). --- src/providers/ipa/ipa_hbac_common.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/providers/ipa/ipa_hbac_common.c') diff --git a/src/providers/ipa/ipa_hbac_common.c b/src/providers/ipa/ipa_hbac_common.c index af0000cf..341b5622 100644 --- a/src/providers/ipa/ipa_hbac_common.c +++ b/src/providers/ipa/ipa_hbac_common.c @@ -111,7 +111,10 @@ ipa_hbac_sysdb_save(struct sysdb_ctx *sysdb, struct sss_domain_info *domain, /* Save the entries and groups to the cache */ ret = sysdb_transaction_start(sysdb); - if (ret != EOK) return ret; + if (ret != EOK) { + DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to start transaction\n")); + goto done; + }; in_transaction = true; /* First, save the specific entries */ @@ -143,7 +146,10 @@ ipa_hbac_sysdb_save(struct sysdb_ctx *sysdb, struct sss_domain_info *domain, } ret = sysdb_transaction_commit(sysdb); - if (ret != EOK) goto done; + if (ret != EOK) { + DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to commit transaction\n")); + goto done; + } in_transaction = false; done: -- cgit