void load_printers(struct tevent_context *ev,
struct messaging_context *msg_ctx)
{
- SMB_ASSERT(pcap_cache_loaded(NULL));
+ if (!pcap_cache_loaded(NULL)) {
+ return;
+ }
add_auto_printers();
bool force)
{
if (background_lpq_updater_pid != -1) {
- if (pcap_cache_loaded(NULL)) {
- load_printers(ev_ctx, msg_ctx);
- }
+ load_printers(ev_ctx, msg_ctx);
if (force) {
/* Send a sighup to the background process.
* this will force it to reload printers */
* If so then we probably missed a message and should load_printers()
* ourselves. If pcap has not been loaded yet, then ignore, we will get
* a message as soon as the bq process completes the reload. */
- if (pcap_cache_loaded(NULL)) {
- load_printers(ev_ctx, msg_ctx);
- }
+ load_printers(ev_ctx, msg_ctx);
/* try to reinit rpc queues */
spoolss_cb.init = spoolss_init_cb;
* If pcap has not been loaded yet, then ignore, as we will reload on
* client enumeration anyway.
*/
- if (pcap_cache_loaded(NULL)) {
- load_printers(ev_ctx, msg_ctx);
- }
+ load_printers(ev_ctx, msg_ctx);
mem_ctx = talloc_new(NULL);
if (mem_ctx == NULL) {