From 7c0607e96d9bb77522d7d8f4f452dc14880a5b0d Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Sun, 9 Sep 2018 18:51:43 +0200 Subject: [PATCH] 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 --- source3/lib/dbwrap/dbwrap_ctdb.c | 1 + 1 file changed, 1 insertion(+) 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); }