summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-05-25 13:00:22 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-05-31 00:32:07 +0200
commit8524924a460349a9aa56db475d771b8884fbe517 (patch)
treee96bf4378c676fdf8f4d2ba6f993aea9837e315e /source3/param
parentc981d4fa1269569a1c2db4bf72a67a357aacd69f (diff)
downloadsamba-8524924a460349a9aa56db475d771b8884fbe517.tar.gz
samba-8524924a460349a9aa56db475d771b8884fbe517.tar.bz2
samba-8524924a460349a9aa56db475d771b8884fbe517.zip
s3-smbd provide struct smbd_server_connection * to conn_snum_used
This provides the 'sconn' parameter to this key functions, that is currently duplicated in dummysmbd.c, which causes duplicate symbol issues in the waf build. This has natrually caused a number of consequential changes across the codebase, includning not passing a messaging context into initial reload_services(): This causes problems because the global smbd_server_connection isn't yet set up, as there isn't a connection here, just the initial process. Andrew Bartlett
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 58ead5bbf7..8aff0cfdbe 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -8676,7 +8676,8 @@ bool lp_loaded(void)
Unload unused services.
***************************************************************************/
-void lp_killunused(bool (*snumused) (int))
+void lp_killunused(struct smbd_server_connection *sconn,
+ bool (*snumused) (struct smbd_server_connection *, int))
{
int i;
for (i = 0; i < iNumServices; i++) {
@@ -8689,7 +8690,7 @@ void lp_killunused(bool (*snumused) (int))
continue;
}
- if (!snumused || !snumused(i)) {
+ if (!snumused || !snumused(sconn, i)) {
free_service_byindex(i);
}
}
@@ -8700,7 +8701,7 @@ void lp_killunused(bool (*snumused) (int))
*/
void lp_kill_all_services(void)
{
- lp_killunused(NULL);
+ lp_killunused(NULL, NULL);
}
/***************************************************************************
@@ -9314,7 +9315,7 @@ int load_usershare_service(const char *servicename)
been removed.
***************************************************************************/
-int load_usershare_shares(void)
+int load_usershare_shares(struct smbd_server_connection *sconn)
{
SMB_STRUCT_DIR *dp;
SMB_STRUCT_STAT sbuf;
@@ -9452,7 +9453,7 @@ int load_usershare_shares(void)
not currently in use. */
for (iService = iNumServices - 1; iService >= 0; iService--) {
if (VALID(iService) && (ServicePtrs[iService]->usershare == USERSHARE_PENDING_DELETE)) {
- if (conn_snum_used(iService)) {
+ if (conn_snum_used(sconn, iService)) {
continue;
}
/* Remove from the share ACL db. */