summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;