s3-printing: Check for browseable too.
authorAndreas Schneider <asn@samba.org>
Fri, 10 Feb 2012 13:00:05 +0000 (14:00 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 14 Mar 2012 16:56:14 +0000 (17:56 +0100)
source3/smbd/server_reload.c

index 6d4b8765d85008619220f0099125d879061660f0..f9891de218f4a2865bbd74ca56e27bc15efb08f5 100644 (file)
 #include "messages.h"
 #include "lib/param/loadparm.h"
 
+static bool snum_is_shared_printer(int snum)
+{
+       return (lp_browseable(snum) && lp_snum_ok(snum) && lp_print_ok(snum));
+}
+
 /**
  * @brief Purge stale printers and reload from pre-populated pcap cache.
  *
@@ -85,7 +90,7 @@ void delete_and_reload_printers(struct tevent_context *ev,
                }
 
                /* skip no-printer services */
-               if (!(lp_snum_ok(snum) && lp_print_ok(snum))) {
+               if (!snum_is_shared_printer(snum)) {
                        continue;
                }