summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-08-17 10:33:58 +0200
committerMichael Adam <obnox@samba.org>2011-10-11 14:17:56 +0200
commitbdee9458f66210a06eb29836a66e14d5d8a7fd33 (patch)
treede7f63ff488d61423ff57c1450e0d29479759238 /source3/lib
parent6656de134612935ed12643064f307cb995cd5cbc (diff)
downloadsamba-bdee9458f66210a06eb29836a66e14d5d8a7fd33.tar.gz
samba-bdee9458f66210a06eb29836a66e14d5d8a7fd33.tar.bz2
samba-bdee9458f66210a06eb29836a66e14d5d8a7fd33.zip
s3:sessionid: use dbwrap_travers_read() in sessionid_travers_read()
This also changes the return code of sessionid_traverse_read() to NTSTATUS. It also uses traverse_read instead of traverse.
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/sessionid_tdb.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source3/lib/sessionid_tdb.c b/source3/lib/sessionid_tdb.c
index 231ff55489..3ed6523cb9 100644
--- a/source3/lib/sessionid_tdb.c
+++ b/source3/lib/sessionid_tdb.c
@@ -127,19 +127,22 @@ static int sessionid_traverse_read_fn(struct db_record *rec,
state->private_data);
}
-int sessionid_traverse_read(int (*fn)(const char *key,
- struct sessionid *session,
- void *private_data),
- void *private_data)
+NTSTATUS sessionid_traverse_read(int (*fn)(const char *key,
+ struct sessionid *session,
+ void *private_data),
+ void *private_data)
{
struct db_context *db;
struct sessionid_traverse_read_state state;
+ NTSTATUS status;
db = session_db_ctx();
if (db == NULL) {
- return -1;
+ return NT_STATUS_UNSUCCESSFUL;
}
state.fn = fn;
state.private_data = private_data;
- return db->traverse(db, sessionid_traverse_read_fn, &state);
+ status = dbwrap_traverse_read(db, sessionid_traverse_read_fn, &state,
+ NULL);
+ return status;
}