summaryrefslogtreecommitdiff
path: root/source3/smbd/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r--source3/smbd/server.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 2c5ce400854..72a15fc5575 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -689,9 +689,9 @@ static void smbd_parent_loop(struct smbd_parent_context *parent)
/* NOTREACHED return True; */
}
-/****************************************************************************
- Reload printers
-**************************************************************************/
+/***************************************************************************
+ purge stale printers and reload from pre-populated pcap cache
+***************************************************************************/
void reload_printers(void)
{
int snum;
@@ -699,9 +699,9 @@ void reload_printers(void)
int pnum = lp_servicenumber(PRINTERS_NAME);
const char *pname;
- pcap_cache_reload();
+ SMB_ASSERT(pcap_cache_loaded());
- /* remove stale printers */
+ DEBUG(10, ("reloading printer services from pcap cache\n"));
for (snum = 0; snum < n_services; snum++) {
/* avoid removing PRINTERS_NAME or non-autoloaded printers */
if (snum == pnum || !(lp_snum_ok(snum) && lp_print_ok(snum) &&
@@ -748,7 +748,7 @@ bool reload_services(bool test)
ret = lp_load(get_dyn_CONFIGFILE(), False, False, True, True);
- reload_printers();
+ pcap_cache_reload(&reload_printers);
/* perhaps the config filename is now set */
if (!test)