diff options
author | Michael Adam <obnox@samba.org> | 2011-08-17 10:20:46 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-10-11 14:17:56 +0200 |
commit | 6656de134612935ed12643064f307cb995cd5cbc (patch) | |
tree | a5e602f07df2c9e13d7d65feb71b08106ce4c541 /source3/lib | |
parent | c8924ecc41db8da01d2918c9b82abc2cfce4351f (diff) | |
download | samba-6656de134612935ed12643064f307cb995cd5cbc.tar.gz samba-6656de134612935ed12643064f307cb995cd5cbc.tar.bz2 samba-6656de134612935ed12643064f307cb995cd5cbc.zip |
s3:sessionid: use dbwrap_travers() in sessionid_traverse()
This also changes sessionid_traverse to NTSTATUS return type.
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/sessionid_tdb.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/lib/sessionid_tdb.c b/source3/lib/sessionid_tdb.c index ebc1b8af79..231ff55489 100644 --- a/source3/lib/sessionid_tdb.c +++ b/source3/lib/sessionid_tdb.c @@ -83,21 +83,23 @@ static int sessionid_traverse_fn(struct db_record *rec, void *private_data) state->private_data); } -int sessionid_traverse(int (*fn)(struct db_record *rec, const char *key, - struct sessionid *session, - void *private_data), - void *private_data) +NTSTATUS sessionid_traverse(int (*fn)(struct db_record *rec, const char *key, + struct sessionid *session, + void *private_data), + void *private_data) { struct db_context *db; struct sessionid_traverse_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_fn, &state); + status = dbwrap_traverse(db, sessionid_traverse_fn, &state, NULL); + return status; } struct sessionid_traverse_read_state { |