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/smbd/sesssetup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source3/smbd/sesssetup.c') diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 289055cc6b..cad2dd33b8 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -1356,8 +1356,7 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req) a new session setup with VC==0 is ignored. ****************************************************************************/ -static int shutdown_other_smbds(struct db_record *rec, - const struct connections_key *key, +static int shutdown_other_smbds(const struct connections_key *key, const struct connections_data *crec, void *private_data) { @@ -1394,7 +1393,7 @@ static void setup_new_vc_session(void) invalidate_all_vuids(); #endif if (lp_reset_on_zero_vc()) { - connections_forall(shutdown_other_smbds, + connections_forall_read(shutdown_other_smbds, CONST_DISCARD(void *, client_addr(get_client_fd(),addr,sizeof(addr)))); } -- cgit