tdb: Improve debugging in _tdb_transaction_start
authorAndrew Bartlett <abartlet@samba.org>
Fri, 31 Mar 2017 04:35:06 +0000 (17:35 +1300)
committerStefan Metzmacher <metze@samba.org>
Thu, 27 Apr 2017 12:52:17 +0000 (14:52 +0200)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/tdb/common/transaction.c

index 4d08fee..f1050a2 100644 (file)
@@ -476,6 +476,10 @@ static int _tdb_transaction_start(struct tdb_context *tdb,
                SAFE_FREE(tdb->transaction);
                if ((lockflags & TDB_LOCK_WAIT) == 0) {
                        tdb->ecode = TDB_ERR_NOLOCK;
+               } else {
+                       TDB_LOG((tdb, TDB_DEBUG_ERROR,
+                                "tdb_transaction_start: "
+                                "failed to get transaction lock\n"));
                }
                return -1;
        }