diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 8 | ||||
-rw-r--r-- | source3/lib/sessionid_tdb.c | 14 |
2 files changed, 12 insertions, 10 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index ffc90ffd2c..7aa1b01baf 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1675,10 +1675,10 @@ void server_messaging_context_free(void); struct sessionid; bool sessionid_init(void); struct db_record *sessionid_fetch_record(TALLOC_CTX *mem_ctx, const char *key); -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); int sessionid_traverse_read(int (*fn)(const char *key, struct sessionid *session, void *private_data), 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 { |