summaryrefslogtreecommitdiff
path: root/source4/lib/tdb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-04-18 11:26:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:04:10 -0500
commitde1757044611c4b68b96c17b40d64e006c097af7 (patch)
tree3c34bb8cd1e16c899f22f8baee3eb7fcf5f0e5a9 /source4/lib/tdb
parent44ba1055031404c2e11247b4b70c8306ffecd094 (diff)
downloadsamba-de1757044611c4b68b96c17b40d64e006c097af7.tar.gz
samba-de1757044611c4b68b96c17b40d64e006c097af7.tar.bz2
samba-de1757044611c4b68b96c17b40d64e006c097af7.zip
r15120: Minimize the diff between Samba3 and Samba4 tdb: In Samba3 we don't allow C++
keywords. Change "private" -> "private_data". Volker (This used to be commit 047671567173e808fece41485bbeaaeebab7d4a2)
Diffstat (limited to 'source4/lib/tdb')
-rw-r--r--source4/lib/tdb/common/traverse.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/lib/tdb/common/traverse.c b/source4/lib/tdb/common/traverse.c
index 4792af1122..65f64c777b 100644
--- a/source4/lib/tdb/common/traverse.c
+++ b/source4/lib/tdb/common/traverse.c
@@ -137,7 +137,7 @@ static int tdb_next_lock(struct tdb_context *tdb, struct tdb_traverse_lock *tloc
a non-zero return value from fn() indicates that the traversal should stop
*/
static int tdb_traverse_internal(struct tdb_context *tdb,
- tdb_traverse_func fn, void *private,
+ tdb_traverse_func fn, void *private_data,
struct tdb_traverse_lock *tl)
{
TDB_DATA key, dbuf;
@@ -176,7 +176,7 @@ static int tdb_traverse_internal(struct tdb_context *tdb,
SAFE_FREE(key.dptr);
goto out;
}
- if (fn && fn(tdb, key, dbuf, private)) {
+ if (fn && fn(tdb, key, dbuf, private_data)) {
/* They want us to terminate traversal */
ret = count;
if (tdb_unlock_record(tdb, tl->off) != 0) {
@@ -201,7 +201,7 @@ out:
a write style traverse - temporarily marks the db read only
*/
int tdb_traverse_read(struct tdb_context *tdb,
- tdb_traverse_func fn, void *private)
+ tdb_traverse_func fn, void *private_data)
{
struct tdb_traverse_lock tl = { NULL, 0, 0, F_RDLCK };
int ret;
@@ -215,7 +215,7 @@ int tdb_traverse_read(struct tdb_context *tdb,
}
tdb->traverse_read++;
- ret = tdb_traverse_internal(tdb, fn, private, &tl);
+ ret = tdb_traverse_internal(tdb, fn, private_data, &tl);
tdb->traverse_read--;
tdb->methods->tdb_brlock(tdb, TRANSACTION_LOCK, F_UNLCK, F_SETLKW, 0);
@@ -228,13 +228,13 @@ int tdb_traverse_read(struct tdb_context *tdb,
prevent deadlocks
*/
int tdb_traverse(struct tdb_context *tdb,
- tdb_traverse_func fn, void *private)
+ tdb_traverse_func fn, void *private_data)
{
struct tdb_traverse_lock tl = { NULL, 0, 0, F_WRLCK };
int ret;
if (tdb->read_only || tdb->traverse_read) {
- return tdb_traverse_read(tdb, fn, private);
+ return tdb_traverse_read(tdb, fn, private_data);
}
if (tdb->methods->tdb_brlock(tdb, TRANSACTION_LOCK, F_WRLCK, F_SETLKW, 0) == -1) {
@@ -243,7 +243,7 @@ int tdb_traverse(struct tdb_context *tdb,
return -1;
}
- ret = tdb_traverse_internal(tdb, fn, private, &tl);
+ ret = tdb_traverse_internal(tdb, fn, private_data, &tl);
tdb->methods->tdb_brlock(tdb, TRANSACTION_LOCK, F_UNLCK, F_SETLKW, 0);