diff options
author | Volker Lendecke <vl@samba.org> | 2010-03-01 14:28:22 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-03-01 14:51:34 +0100 |
commit | 8bebb380e8b581b41f3057c128d73094c1bde332 (patch) | |
tree | 3470aabb76b4800f32ef85a13f6f53936a9e261e /source3/web | |
parent | 3deba6349ca751d669e2af817ec7e2c7eb6195b3 (diff) | |
download | samba-8bebb380e8b581b41f3057c128d73094c1bde332.tar.gz samba-8bebb380e8b581b41f3057c128d73094c1bde332.tar.bz2 samba-8bebb380e8b581b41f3057c128d73094c1bde332.zip |
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.
Diffstat (limited to 'source3/web')
-rw-r--r-- | source3/web/statuspage.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c index f94ffb7926..e633036de3 100644 --- a/source3/web/statuspage.c +++ b/source3/web/statuspage.c @@ -182,8 +182,7 @@ static void print_share_mode(const struct share_mode_entry *e, /* kill off any connections chosen by the user */ -static int traverse_fn1(struct db_record *rec, - const struct connections_key *key, +static int traverse_fn1(const struct connections_key *key, const struct connections_data *crec, void *private_data) { @@ -199,8 +198,7 @@ static int traverse_fn1(struct db_record *rec, } /* traversal fn for showing machine connections */ -static int traverse_fn2(struct db_record *rec, - const struct connections_key *key, +static int traverse_fn2(const struct connections_key *key, const struct connections_data *crec, void *private_data) { @@ -224,8 +222,7 @@ static int traverse_fn2(struct db_record *rec, } /* traversal fn for showing share connections */ -static int traverse_fn3(struct db_record *rec, - const struct connections_key *key, +static int traverse_fn3(const struct connections_key *key, const struct connections_data *crec, void *private_data) { @@ -325,7 +322,7 @@ void status_page(void) PID_or_Machine = 0; } - connections_forall(traverse_fn1, NULL); + connections_forall_read(traverse_fn1, NULL); initPid2Machine (); @@ -415,7 +412,7 @@ void status_page(void) } printf("</tr>\n"); - connections_forall(traverse_fn2, NULL); + connections_forall_read(traverse_fn2, NULL); printf("</table><p>\n"); @@ -424,7 +421,7 @@ void status_page(void) printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n\n", _("Share"), _("User"), _("Group"), _("PID"), _("Client"), _("Date")); - connections_forall(traverse_fn3, NULL); + connections_forall_read(traverse_fn3, NULL); printf("</table><p>\n"); |