diff options
author | Michael Adam <obnox@samba.org> | 2011-08-17 10:08:31 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-10-11 14:17:56 +0200 |
commit | 91e77f364018eae88344e472516573a51c38170d (patch) | |
tree | 93b02403ee8d7cc72b8da5635204bea4c332ac9f /source3 | |
parent | 81258c01b84de488cb3d33139357fe839c1f3323 (diff) | |
download | samba-91e77f364018eae88344e472516573a51c38170d.tar.gz samba-91e77f364018eae88344e472516573a51c38170d.tar.bz2 samba-91e77f364018eae88344e472516573a51c38170d.zip |
s3:serverid: use dbwrap_traverse_read() in serverid_traverse_read()
This also fixes the return value: originally the int return value
of traverse_read which is a count of the records traversed or negative
upon failure, was simply casted into a bool return value.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/serverid.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c index ee8ab32c50..0be53e900d 100644 --- a/source3/lib/serverid.c +++ b/source3/lib/serverid.c @@ -314,6 +314,7 @@ bool serverid_traverse_read(int (*fn)(const struct server_id *id, { struct db_context *db; struct serverid_traverse_read_state state; + NTSTATUS status; db = serverid_db(); if (db == NULL) { @@ -321,7 +322,10 @@ bool serverid_traverse_read(int (*fn)(const struct server_id *id, } state.fn = fn; state.private_data = private_data; - return db->traverse_read(db, serverid_traverse_read_fn, &state); + + status = dbwrap_traverse_read(db, serverid_traverse_read_fn, &state, + NULL); + return NT_STATUS_IS_OK(status); } struct serverid_traverse_state { |