1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

Added tdb_errstr() messages so we can see if these functions fail.

Jeremy.
(This used to be commit ec64ddac5f)
This commit is contained in:
Jeremy Allison 2001-05-23 21:33:43 +00:00
parent 4d86a2841c
commit b065de612c

View File

@ -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: