summaryrefslogtreecommitdiff
path: root/source3/smbd/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/connection.c')
-rw-r--r--source3/smbd/connection.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c
index 5da2b08faa..5a9f4071b4 100644
--- a/source3/smbd/connection.c
+++ b/source3/smbd/connection.c
@@ -130,6 +130,18 @@ int count_current_connections( const char *sharename, bool clear )
return cs.curr_connections;
}
+bool connections_snum_used(struct smbd_server_connection *unused, int snum)
+{
+ int active;
+
+ active = count_current_connections(lp_servicename(snum), true);
+ if (active > 0) {
+ return true;
+ }
+
+ return false;
+}
+
/****************************************************************************
Claim an entry in the connections database.
****************************************************************************/