From 8bebb380e8b581b41f3057c128d73094c1bde332 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 1 Mar 2010 14:28:22 +0100 Subject: s3: Add connections_forall_read() In a cluster, this makes a large difference: For r/w traverse, we have to do a fetch_locked on every record which for most users of connections_forall is just overkill. --- source3/utils/net_status.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source3/utils/net_status.c') diff --git a/source3/utils/net_status.c b/source3/utils/net_status.c index ce7dbcaf20..47860cb584 100644 --- a/source3/utils/net_status.c +++ b/source3/utils/net_status.c @@ -151,8 +151,7 @@ static int collect_pid(struct db_record *rec, void *private_data) return 0; } -static int show_share_parseable(struct db_record *rec, - const struct connections_key *key, +static int show_share_parseable(const struct connections_key *key, const struct connections_data *crec, void *state) { @@ -205,7 +204,7 @@ static int net_status_shares_parseable(struct net_context *c, int argc, const ch db->traverse_read(db, collect_pid, &ids); TALLOC_FREE(db); - connections_forall(show_share_parseable, &ids); + connections_forall_read(show_share_parseable, &ids); SAFE_FREE(ids.entries); -- cgit