Stefan Metzmacher
4676e7f65d
dbwrap: don't ignore the result of dbwrap_parse_record in dbwrap_fetch_int32()
...
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun 22 17:10:52 CEST 2012 on sn-devel-104
2012-06-22 17:10:52 +02:00
Stefan Metzmacher
0f25bd78ca
dbwrap: intialize state.status in dbwrap_fetch_int32()
...
This might not be needed, but it makes it more clear that
we won't use uninitialized memory, it the callback was not triggered.
metze
2012-06-22 15:16:53 +02:00
Volker Lendecke
d7b9e0d19a
dbwrap: Convert fetch_int32 to dbwrap_parse_record
...
Now dbwrap_fetch_int32 is used in smbd/locking/posix.c is used a
lot more often than before.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-22 15:16:52 +02:00
Volker Lendecke
e0abd1938a
dbwrap: Add dbwrap_fetch_int32
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-22 15:16:47 +02:00
Volker Lendecke
ce7b0b9906
dbwrap: Add dbwrap_change_int32_atomic
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-22 15:16:45 +02:00
Rusty Russell
945473aac0
dbwrap: dbwrap_hash_size().
...
Implemented for ntdb and tdb; falls back to 0 for others.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
e92cb556fd
dbwrap: dbwrap_name().
...
Useful for debug messages: particularly once we start switching between .tdb
and .ntdb files.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
41f799d877
dbwrap: dbwrap_transaction_start_nonblock().
...
Implemented for ntdb and tdb; falls back to the blocking variant
for others.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
f6eb187fda
dbwrap: dbwrap_fetch_locked_timeout().
...
Implemented for ntdb and tdb; falls back to the non-timeout variant
for others.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
431667b47c
dbwrap: add dbwrap_check() function.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
9d97bf3f47
dbwrap: dbwrap_local_open()
...
This simply opens a tdb: it will eventually switch depending on the
extension.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
1acf548eb7
dbwrap: remove get_flags().
...
The flags returned were TDB-specific: this was only used for detecting
the endianness of obsolete databases (the conversion code was put in in
2003, with reference to Samba 2.3).
It's easier to remove it than to translate the NTDB flags to TDB flags,
and it's a really weird thing to ask for anyway.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
6dc02e832a
lib/dbwrap: depend directly on tdb, not tdb_compat.
...
Simple change, as we get rid of tdb_compat in favour of either ntdb directly
or dbwrap.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-19 05:38:07 +02:00
Volker Lendecke
442cb66c16
dbwrap: Remove an unnecessary ZERO_STRUCT
...
We assign the only struct member one line down
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15 18:32:21 +02:00
Volker Lendecke
1d9ff7d3bc
dbwrap: dbwrap_trans_store_uint32->dbwrap_trans_store_uint32_bystring
...
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Jun 15 14:20:04 CEST 2012 on sn-devel-104
2012-06-15 14:19:57 +02:00
Volker Lendecke
64fec465c1
dbwrap: dbwrap_trans_store_int32->dbwrap_trans_store_int32_bystring
...
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:29 +02:00
Volker Lendecke
07d6c25525
dbwrap: dbwrap_trans_change_int32_atomic->dbwrap_trans_change_int32_atomic_bystring
...
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:28 +02:00
Volker Lendecke
8b99d40520
dbwrap: dbwrap_change_int32_atomic->dbwrap_change_int32_atomic_bystring
...
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:28 +02:00
Volker Lendecke
9275d571d9
dbwrap: dbwrap_trans_change_uint32_atomic->dbwrap_trans_change_uint32_atomic_bystring
...
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:28 +02:00
Volker Lendecke
37ad03f91d
dbwrap: dbwrap_change_uint32_atomic->dbwrap_change_uint32_atomic_bystring
...
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:28 +02:00
Volker Lendecke
8f94ecbb90
dbwrap: dbwrap_store_uint32->dbwrap_store_uint32_bystring
...
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:28 +02:00
Volker Lendecke
7f19a5ab52
dbwrap: dbwrap_fetch_uint32->dbwrap_fetch_uint32_bystring
...
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:28 +02:00
Volker Lendecke
749314fcf9
dbwrap: dbwrap_store_int32->dbwrap_store_int32_bystring
...
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:27 +02:00
Volker Lendecke
737c0a5473
dbwrap: dbwrap_fetch_int32->dbwrap_fetch_int32_bystring
...
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:27 +02:00
Volker Lendecke
855d23b742
s3: Use talloc_tos() in more places in dbwrap_util
...
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jun 12 15:37:16 CEST 2012 on sn-devel-104
2012-06-12 15:37:15 +02:00
Stefan Metzmacher
5e5f5692b8
lib/dbwrap: make it possible to delete/store the current record during traverse
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu May 31 02:50:09 CEST 2012 on sn-devel-104
2012-05-31 02:50:09 +02:00
Stefan Metzmacher
39ac9457a3
lib/dbwrap: don't alter the record on failure in db_rbt_store()
...
metze
2012-05-31 00:53:19 +02:00
Stefan Metzmacher
a06b9b413e
lib/dbwrap: fix db_rbt_store and update the per record node pointer
...
metze
2012-05-31 00:53:19 +02:00
Stefan Metzmacher
5b8cb6b2be
lib/dbwrap: remove unused per db_record pointer in dbwrap_rbt
...
metze
2012-05-31 00:53:19 +02:00
Volker Lendecke
2298622243
dbwrap: Fix Coverity ID 242750 Incorrect sizeof expression
...
Taking the size of "db" is correct, but a bit fishy. Silence Coverity.
2012-05-15 21:37:07 +02:00
Michael Adam
e945511aae
move the dbwrap library to the top level
...
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon May 14 04:04:55 CEST 2012 on sn-devel-104
2012-05-14 04:04:55 +02:00