From 49d7f0afbc1c5425d53019e234d54ddf205c8e9a Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Fri, 4 Feb 2000 04:59:31 +0000 Subject: 1) added void* state argument to tdb_traverse. guess what! there were two places i found where it was appropriate to _use_ that third argument, in locking.c and brlock.c! there was a static traverse_function and i removed the static variable, typecast it to a void*, passed it to tdb_traverse and re-cast it back to the traverse_function inside the tdb_traverse function. this makes the use of tdb_traverse() reentrant, which is never going to happen, i know, i just don't like to see statics lying about when there's no need for them. as i had to do in samba-tng, all uses of tdb_traverse modified to take the new void* state argument. 2) disabled rpcclient: referring people to use SAMBA_TNG rpcclient. i don't know how the other samba team members would react if i deleted rpcclient from cvs main. damn, that code's so old, it's unreal. 20 rpcclient commands, instead of about 70 in SAMBA_TNG. --- source/web/statuspage.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/web/statuspage.c') diff --git a/source/web/statuspage.c b/source/web/statuspage.c index e9cda3bd701..5c800797c04 100644 --- a/source/web/statuspage.c +++ b/source/web/statuspage.c @@ -72,7 +72,7 @@ static void print_share_mode(share_mode_entry *e, char *fname) /* kill off any connections chosen by the user */ -static int traverse_fn1(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf) +static int traverse_fn1(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void* state) { struct connections_data crec; memcpy(&crec, dbuf.dptr, sizeof(crec)); @@ -88,7 +88,7 @@ static int traverse_fn1(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf) } /* traversal fn for showing machine connections */ -static int traverse_fn2(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf) +static int traverse_fn2(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void* state) { struct connections_data crec; memcpy(&crec, dbuf.dptr, sizeof(crec)); @@ -109,7 +109,7 @@ static int traverse_fn2(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf) } /* traversal fn for showing share connections */ -static int traverse_fn3(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf) +static int traverse_fn3(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void* state) { struct connections_data crec; memcpy(&crec, dbuf.dptr, sizeof(crec)); @@ -171,7 +171,7 @@ void status_page(void) } tdb = tdb_open(lock_path("connections.tdb"), 0, 0, O_RDONLY, 0); - if (tdb) tdb_traverse(tdb, traverse_fn1); + if (tdb) tdb_traverse(tdb, traverse_fn1, NULL); printf("

Server Status

\n"); @@ -237,7 +237,7 @@ void status_page(void) } printf("\n"); - if (tdb) tdb_traverse(tdb, traverse_fn2); + if (tdb) tdb_traverse(tdb, traverse_fn2, NULL); printf("

\n"); @@ -245,7 +245,7 @@ void status_page(void) printf("\n"); printf("\n\n"); - if (tdb) tdb_traverse(tdb, traverse_fn3); + if (tdb) tdb_traverse(tdb, traverse_fn3, NULL); printf("
ShareUserGroupPIDClientDate

\n"); -- cgit