summaryrefslogtreecommitdiff
path: root/source3/smbd/connection.c
diff options
context:
space:
mode:
authorGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:34:30 -0500
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:34:30 -0500
commite5a951325a6cac8567af3a66de6d2df577508ae4 (patch)
tree34da9fe59f3c2d7f8edb072144443a9704197831 /source3/smbd/connection.c
parent57482469b32645250e92a7ffd003aeeb4a42235e (diff)
downloadsamba-e5a951325a6cac8567af3a66de6d2df577508ae4.tar.gz
samba-e5a951325a6cac8567af3a66de6d2df577508ae4.tar.bz2
samba-e5a951325a6cac8567af3a66de6d2df577508ae4.zip
[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
Diffstat (limited to 'source3/smbd/connection.c')
-rw-r--r--source3/smbd/connection.c32
1 files changed, 3 insertions, 29 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c
index 4b807f7b90..65b7c352c5 100644
--- a/source3/smbd/connection.c
+++ b/source3/smbd/connection.c
@@ -83,19 +83,9 @@ static int count_fn(struct db_record *rec,
}
return 0;
}
-
- if (cs->name) {
- /* We are counting all the connections to a given share. */
- if (strequal(crec->servicename, cs->name)) {
- cs->curr_connections++;
- }
- } else {
- /* We are counting all the connections. Static registrations
- * like the lpq backgroud process and the smbd daemon process
- * have a cnum of -1, so won't be counted here.
- */
+
+ if (strequal(crec->servicename, cs->name))
cs->curr_connections++;
- }
return 0;
}
@@ -121,29 +111,13 @@ int count_current_connections( const char *sharename, BOOL clear )
if (connections_forall(count_fn, &cs) == -1) {
DEBUG(0,("count_current_connections: traverse of "
"connections.tdb failed\n"));
- DEBUGADD(0, ("count_current_connections: connection count of %d might not be accurate",
- cs.curr_connections));
+ return False;
}
- /* If the traverse failed part-way through, we at least return
- * as many connections as we had already counted. If it failed
- * right at the start, we will return 0, which is about all we
- * can do anywway.
- */
-
return cs.curr_connections;
}
/****************************************************************************
- Count the number of connections open across all shares.
-****************************************************************************/
-
-int count_all_current_connections(void)
-{
- return count_current_connections(NULL, True /* clear stale entries */);
-}
-
-/****************************************************************************
Claim an entry in the connections database.
****************************************************************************/