From: Ralph Boehme Date: Sun, 9 Sep 2018 16:51:43 +0000 (+0200) Subject: dbwrap_ctdb: increment record count in traverse_callback() X-Git-Tag: tdb-1.3.17~1633 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c0607e96d9bb77522d7d8f4f452dc14880a5b0d;p=thirdparty%2Fsamba.git dbwrap_ctdb: increment record count in traverse_callback() state->count wasn't incremented and is returned at the end of a dbwrap_traverse(). Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index b02f19492ae..c6100e3fbaf 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -1545,6 +1545,7 @@ static void traverse_callback(TDB_DATA key, TDB_DATA data, void *private_data) rec = db_ctdb_fetch_locked(state->db, tmp_ctx, key); if (rec != NULL && rec->value.dsize > 0) { state->fn(rec, state->private_data); + state->count++; } talloc_free(tmp_ctx); }