[PATCH] Report tdb errors in yeild_connection

Andrew Bartlett abartlet at pcug.org.au
Sat May 26 13:18:52 GMT 2001


This (tested) patch just lets us see if there was any problem yeilding a
connection in the connections.tdb.  For SAMBA_2_2.

Andrew Bartlett

-- 
Andrew Bartlett
abartlet at pcug.org.au
-------------- next part --------------
Index: source/smbd/connection.c
===================================================================
RCS file: /cvsroot/samba/source/smbd/connection.c,v
retrieving revision 1.20.4.14
diff -u -r1.20.4.14 connection.c
--- source/smbd/connection.c	23 May 2001 21:33:40 -0000	1.20.4.14
+++ source/smbd/connection.c	26 May 2001 13:14:17 -0000
@@ -58,7 +58,11 @@
 	kbuf.dptr = (char *)&key;
 	kbuf.dsize = sizeof(key);
 
-	tdb_delete(tdb, kbuf);
+	if (tdb_delete(tdb, kbuf) != 0) {
+		DEBUG(0,("yeild_connection: tdb_delete failed with error %s.\n",
+			tdb_errorstr(tdb) ));
+		return (False);
+	}
 
 	return(True);
 }


More information about the samba-technical mailing list