summaryrefslogtreecommitdiff
path: root/source3/smbd/connection.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-06-14 17:50:41 +0200
committerVolker Lendecke <vl@samba.org>2011-06-14 17:55:30 +0200
commit2817eed7412380116766a75718c90e635f6c93f4 (patch)
tree1244a69aac6c1d1e8492d87e02eb7cf684a2010a /source3/smbd/connection.c
parent15149002b64b26a8135094677121599a000b3b9d (diff)
downloadsamba-2817eed7412380116766a75718c90e635f6c93f4.tar.gz
samba-2817eed7412380116766a75718c90e635f6c93f4.tar.bz2
samba-2817eed7412380116766a75718c90e635f6c93f4.zip
s3: Fix count_current_connections
"False" is not really a valid return value for "int"..
Diffstat (limited to 'source3/smbd/connection.c')
-rw-r--r--source3/smbd/connection.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c
index 8560a5d211..08afd92f6e 100644
--- a/source3/smbd/connection.c
+++ b/source3/smbd/connection.c
@@ -101,6 +101,7 @@ static int count_fn(struct db_record *rec,
int count_current_connections( const char *sharename, bool clear )
{
struct count_stat cs;
+ int ret;
cs.curr_connections = 0;
cs.name = sharename;
@@ -111,10 +112,11 @@ int count_current_connections( const char *sharename, bool clear )
* as it leads to deadlock.
*/
- if (connections_forall(count_fn, &cs) == -1) {
+ ret = connections_forall(count_fn, &cs);
+ if (ret == -1) {
DEBUG(0,("count_current_connections: traverse of "
"connections.tdb failed\n"));
- return False;
+ return 0;
}
return cs.curr_connections;