diff options
Diffstat (limited to 'source4/lib/tdb')
-rw-r--r-- | source4/lib/tdb/common/tdbutil.c | 12 | ||||
-rw-r--r-- | source4/lib/tdb/include/tdbutil.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source4/lib/tdb/common/tdbutil.c b/source4/lib/tdb/common/tdbutil.c index 3f9b227591..df9ce4e238 100644 --- a/source4/lib/tdb/common/tdbutil.c +++ b/source4/lib/tdb/common/tdbutil.c @@ -42,10 +42,10 @@ static TDB_DATA make_tdb_data(const char *dptr, size_t dsize) } /**************************************************************************** - Lock a chain by string. Return -1 if timeout or lock failed. + Lock a chain by string. Return -1 if lock failed. ****************************************************************************/ -int tdb_lock_bystring(TDB_CONTEXT *tdb, const char *keyval, uint_t timeout) +int tdb_lock_bystring(TDB_CONTEXT *tdb, const char *keyval) { TDB_DATA key = make_tdb_data(keyval, strlen(keyval)+1); @@ -64,10 +64,10 @@ void tdb_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval) } /**************************************************************************** - Read lock a chain by string. Return -1 if timeout or lock failed. + Read lock a chain by string. Return -1 if lock failed. ****************************************************************************/ -int tdb_read_lock_bystring(TDB_CONTEXT *tdb, const char *keyval, uint_t timeout) +int tdb_read_lock_bystring(TDB_CONTEXT *tdb, const char *keyval) { TDB_DATA key = make_tdb_data(keyval, strlen(keyval)+1); @@ -252,7 +252,7 @@ int32_t tdb_change_int32_atomic(TDB_CONTEXT *tdb, const char *keystr, int32_t *o int32_t val; int32_t ret = -1; - if (tdb_lock_bystring(tdb, keystr,0) == -1) + if (tdb_lock_bystring(tdb, keystr) == -1) return -1; if ((val = tdb_fetch_int32(tdb, keystr)) == -1) { @@ -293,7 +293,7 @@ BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr, uint32_t *ol uint32_t val; BOOL ret = False; - if (tdb_lock_bystring(tdb, keystr,0) == -1) + if (tdb_lock_bystring(tdb, keystr) == -1) return False; if (!tdb_fetch_uint32(tdb, keystr, &val)) { diff --git a/source4/lib/tdb/include/tdbutil.h b/source4/lib/tdb/include/tdbutil.h index 80d93b7984..fb9e5cf48f 100644 --- a/source4/lib/tdb/include/tdbutil.h +++ b/source4/lib/tdb/include/tdbutil.h @@ -35,7 +35,7 @@ typedef struct keys_node TDB_LIST_NODE *tdb_search_keys(TDB_CONTEXT*, const char*); void tdb_search_list_free(TDB_LIST_NODE*); int32_t tdb_change_int32_atomic(TDB_CONTEXT *tdb, const char *keystr, int32_t *oldval, int32_t change_val); -int tdb_lock_bystring(TDB_CONTEXT *tdb, const char *keyval, uint_t timeout); +int tdb_lock_bystring(TDB_CONTEXT *tdb, const char *keyval); void tdb_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval); int32_t tdb_fetch_int32(TDB_CONTEXT *tdb, const char *keystr); int tdb_store_int32(TDB_CONTEXT *tdb, const char *keystr, int32_t v); |