From 1399e6bdf52d2ef08d1cea918a171108c502900a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 13 Dec 2011 11:50:04 +0100 Subject: s3:param: don't reference conn_snum_used directly in load_usershare_shares() This uses the same logic as lp_killunused(). metze --- source3/param/loadparm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/param') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index d4064835ac..e0da6fdf1d 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -8731,7 +8731,8 @@ int load_usershare_service(const char *servicename) been removed. ***************************************************************************/ -int load_usershare_shares(struct smbd_server_connection *sconn) +int load_usershare_shares(struct smbd_server_connection *sconn, + bool (*snumused) (struct smbd_server_connection *, int)) { SMB_STRUCT_DIR *dp; SMB_STRUCT_STAT sbuf; @@ -8869,7 +8870,7 @@ int load_usershare_shares(struct smbd_server_connection *sconn) not currently in use. */ for (iService = iNumServices - 1; iService >= 0; iService--) { if (VALID(iService) && (ServicePtrs[iService]->usershare == USERSHARE_PENDING_DELETE)) { - if (conn_snum_used(sconn, iService)) { + if (snumused && snumused(sconn, iService)) { continue; } /* Remove from the share ACL db. */ -- cgit