diff --git a/source3/printing/pcap.c b/source3/printing/pcap.c index 726111816d6..d771cd9dfeb 100644 --- a/source3/printing/pcap.c +++ b/source3/printing/pcap.c @@ -139,6 +139,11 @@ void pcap_cache_reload(struct tevent_context *ev, DEBUG(3, ("reloading printcap cache\n")); + if (!lp_load_printers()) { + DBG_NOTICE("skipping reload - load printers disabled\n"); + return; + } + /* only go looking if no printcap name supplied */ if (pcap_name == NULL || *pcap_name == 0) { DEBUG(0, ("No printcap file name configured!\n")); diff --git a/source3/printing/queue_process.c b/source3/printing/queue_process.c index 197bde01086..7ac609a318a 100644 --- a/source3/printing/queue_process.c +++ b/source3/printing/queue_process.c @@ -172,7 +172,7 @@ static bool printing_subsystem_queue_tasks(struct bq_state *state) /* cancel any existing housekeeping event */ TALLOC_FREE(state->housekeep); - if (housekeeping_period == 0) { + if ((housekeeping_period == 0) || !lp_load_printers()) { DEBUG(4, ("background print queue housekeeping disabled\n")); return true; }