summaryrefslogtreecommitdiff
path: root/src/db/sysdb_services.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/sysdb_services.c')
-rw-r--r--src/db/sysdb_services.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/db/sysdb_services.c b/src/db/sysdb_services.c
index 9a5e57a0..f3ed48ed 100644
--- a/src/db/sysdb_services.c
+++ b/src/db/sysdb_services.c
@@ -202,7 +202,10 @@ sysdb_store_service(struct sysdb_ctx *sysdb,
if (!tmp_ctx) return ENOMEM;
ret = sysdb_transaction_start(sysdb);
- if (ret != EOK) goto done;
+ if (ret != EOK) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to start transaction\n"));
+ goto done;
+ }
in_transaction = true;
@@ -403,7 +406,11 @@ sysdb_store_service(struct sysdb_ctx *sysdb,
}
ret = sysdb_transaction_commit(sysdb);
- if (ret == EOK) in_transaction = false;
+ if (ret != EOK) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to commit transaction\n"));
+ goto done;
+ }
+ in_transaction = false;
done:
if (in_transaction) {
@@ -660,7 +667,10 @@ sysdb_svc_delete(struct sysdb_ctx *sysdb,
}
ret = sysdb_transaction_start(sysdb);
- if (ret != EOK) goto done;
+ if (ret != EOK) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to start transaction\n"));
+ goto done;
+ }
in_transaction = true;
@@ -692,6 +702,10 @@ sysdb_svc_delete(struct sysdb_ctx *sysdb,
}
ret = sysdb_transaction_commit(sysdb);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to commit transaction\n"));
+ goto done;
+ }
in_transaction = false;
done:
@@ -702,6 +716,7 @@ done:
("Could not cancel transaction\n"));
}
}
+
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_TRACE_INTERNAL,
("Error: %d (%s)\n", ret, strerror(ret)));