From b065de612caef016876328a3ab8cf842f700921b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 23 May 2001 21:33:43 +0000 Subject: Added tdb_errstr() messages so we can see if these functions fail. Jeremy. (This used to be commit ec64ddac5fa4688b18484d6599b17b8c4bcd34c0) --- source3/smbd/connection.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c index edbc49777e..16f6ba6afd 100644 --- a/source3/smbd/connection.c +++ b/source3/smbd/connection.c @@ -141,13 +141,17 @@ BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOO * locked. This is slow but removes race conditions. JRA. */ - if (tdb_chainlock(tdb, lockkey)) + if (tdb_chainlock(tdb, lockkey)) { + DEBUG(0,("claim_connection: tdb_chainlock failed %s\n", + tdb_errorstr(tdb) )); return False; + } rec_locked = True; if (tdb_traverse(tdb, count_fn, &cs) == -1) { - DEBUG(0,("claim_connection: traverse of connections.tdb failed.\n")); + DEBUG(0,("claim_connection: traverse of connections.tdb failed with error %s.\n", + tdb_errorstr(tdb) )); ret = False; goto out; } @@ -190,8 +194,11 @@ BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOO dbuf.dptr = (char *)&crec; dbuf.dsize = sizeof(crec); - if (tdb_store(tdb, kbuf, dbuf, TDB_REPLACE) != 0) + if (tdb_store(tdb, kbuf, dbuf, TDB_REPLACE) != 0) { + DEBUG(0,("claim_connection: tdb_store failed with error %s.\n", + tdb_errorstr(tdb) )); ret = False; + } out: -- cgit