summaryrefslogtreecommitdiff
path: root/source3/tdb
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-01-15 18:57:41 +0000
committerGerald Carter <jerry@samba.org>2003-01-15 18:57:41 +0000
commit99cdb462083381c88689a4e698ca48b6ed4cf5ac (patch)
tree7ea530c74c8fd1ef65eec52410b7843e63d89f8f /source3/tdb
parent35fa2e5975f9b380e6e63471413df6f4182c164b (diff)
downloadsamba-99cdb462083381c88689a4e698ca48b6ed4cf5ac.tar.gz
samba-99cdb462083381c88689a4e698ca48b6ed4cf5ac.tar.bz2
samba-99cdb462083381c88689a4e698ca48b6ed4cf5ac.zip
*lots of small merges form HEAD
*sync up configure.in *don't build torture tools in make all *make sure to remove torture tools as part of make clean (This used to be commit 0fb724b3216eeeb97e61ff12755ca3a31bcad6ef)
Diffstat (limited to 'source3/tdb')
-rw-r--r--source3/tdb/tdbutil.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/tdb/tdbutil.c b/source3/tdb/tdbutil.c
index 2fd734f5d4..da155de4d7 100644
--- a/source3/tdb/tdbutil.c
+++ b/source3/tdb/tdbutil.c
@@ -74,6 +74,10 @@ static int tdb_chainlock_with_timeout( TDB_CONTEXT *tdb, TDB_DATA key, unsigned
if (gotalarm) {
DEBUG(0,("tdb_chainlock_with_timeout: alarm (%u) timed out for key %s in tdb %s\n",
timeout, key.dptr, tdb->name ));
+ /* TODO: If we time out waiting for a lock, it might
+ * be nice to use F_GETLK to get the pid of the
+ * process currently holding the lock and print that
+ * as part of the debugging message. -- mbp */
return -1;
}
}
@@ -99,7 +103,7 @@ int tdb_lock_bystring(TDB_CONTEXT *tdb, const char *keyval, unsigned int timeout
void tdb_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval)
{
TDB_DATA key = make_tdb_data(keyval, strlen(keyval)+1);
-
+
tdb_chainunlock(tdb, key);
}
@@ -256,8 +260,8 @@ BOOL tdb_store_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 value)
int tdb_store_by_string(TDB_CONTEXT *tdb, const char *keystr, TDB_DATA data, int flags)
{
TDB_DATA key = make_tdb_data(keystr, strlen(keystr)+1);
-
- return tdb_store(tdb, key, data, flags);
+
+ return tdb_store(tdb, key, data, flags);
}
/****************************************************************************
@@ -269,7 +273,7 @@ TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, const char *keystr)
{
TDB_DATA key = make_tdb_data(keystr, strlen(keystr)+1);
- return tdb_fetch(tdb, key);
+ return tdb_fetch(tdb, key);
}
/****************************************************************************
@@ -280,7 +284,7 @@ int tdb_delete_by_string(TDB_CONTEXT *tdb, const char *keystr)
{
TDB_DATA key = make_tdb_data(keystr, strlen(keystr)+1);
- return tdb_delete(tdb, key);
+ return tdb_delete(tdb, key);
}
/****************************************************************************