summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-05-23 21:33:43 +0000
committerJeremy Allison <jra@samba.org>2001-05-23 21:33:43 +0000
commitb065de612caef016876328a3ab8cf842f700921b (patch)
tree8e0a2b7357f4bca36b74f8d1334853478f897f66 /source3/smbd
parent4d86a2841cd3941c8b67e3f2dc1670562b6874a6 (diff)
downloadsamba-b065de612caef016876328a3ab8cf842f700921b.tar.gz
samba-b065de612caef016876328a3ab8cf842f700921b.tar.bz2
samba-b065de612caef016876328a3ab8cf842f700921b.zip
Added tdb_errstr() messages so we can see if these functions fail.
Jeremy. (This used to be commit ec64ddac5fa4688b18484d6599b17b8c4bcd34c0)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/connection.c13
1 files changed, 10 insertions, 3 deletions
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: