1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-23 20:23:50 +03:00

r15101: Little step towards getting Samba4 tdb into 3: tdb_lock_bystring does not

have the timeout argument in Samba4. Add a new routine
tdb_lock_bystring_with_timeout.

Volker
This commit is contained in:
Volker Lendecke
2006-04-17 11:49:06 +00:00
committed by Gerald (Jerry) Carter
parent d3d388180d
commit b9c6e3f556
12 changed files with 32 additions and 24 deletions

View File

@@ -163,7 +163,7 @@ BOOL make_way_for_eventlogs( TDB_CONTEXT * the_tdb, int32 needed,
if ( mem_ctx == NULL )
return False; /* can't allocate memory indicates bigger problems */
/* lock */
tdb_lock_bystring( the_tdb, EVT_NEXT_RECORD, 1 );
tdb_lock_bystring_with_timeout( the_tdb, EVT_NEXT_RECORD, 1 );
/* read */
end_record = tdb_fetch_int32( the_tdb, EVT_NEXT_RECORD );
start_record = tdb_fetch_int32( the_tdb, EVT_OLDEST_ENTRY );
@@ -489,7 +489,7 @@ int write_eventlog_tdb( TDB_CONTEXT * the_tdb, Eventlog_entry * ee )
/* need to read the record number and insert it into the entry here */
/* lock */
tdb_lock_bystring( the_tdb, EVT_NEXT_RECORD, 1 );
tdb_lock_bystring_with_timeout( the_tdb, EVT_NEXT_RECORD, 1 );
/* read */
next_record = tdb_fetch_int32( the_tdb, EVT_NEXT_RECORD );