s3-printing: remove pcap_cache_loaded asserts
authorDavid Disseldorp <ddiss@suse.de>
Mon, 17 Jan 2011 15:09:32 +0000 (16:09 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 18 Aug 2011 19:14:48 +0000 (21:14 +0200)
pcap_cache_loaded() assertions were added to the (re)load_printers()
functions, to ensure the caller had called pcap_cache_reload() prior to
reloading printer shares.

The problem is, pcap_cache_loaded() returns false if the the pcap_cache
contains no printer entries. i.e. pcap_cache_reload() has run but not
detected any printers.

Remove these assertions, correct call ordering is already enforced.

Signed-off-by: Günther Deschner <gd@samba.org>
The last 3 patches address bug #7836 (A newly added printer isn't visbile to
clients).
(cherry picked from commit da9b2d9d58193ed3da36c2f8ff1e41a1e743ba07)

source3/printing/load.c
source3/smbd/server.c

index 00da9cb2921d350bc2ec9b24fe68ec3a96978d3e..c80a4794fbbd7a495c2961b675afb114751548d3 100644 (file)
@@ -57,8 +57,6 @@ load automatic printer services from pre-populated pcap cache
 ***************************************************************************/
 void load_printers(void)
 {
-       SMB_ASSERT(pcap_cache_loaded());
-
        add_auto_printers();
 
        /* load all printcap printers */
index 6147526172ce700d5d71f1f8758098e4cab6de16..9c2709caf6ba49cc89862d77515b2daa641b0474 100644 (file)
@@ -715,8 +715,6 @@ void reload_printers(void)
        int pnum = lp_servicenumber(PRINTERS_NAME);
        const char *pname;
 
-       SMB_ASSERT(pcap_cache_loaded());
-
        DEBUG(10, ("reloading printer services from pcap cache\n"));
        for (snum = 0; snum < n_services; snum++) {
                /* avoid removing PRINTERS_NAME or non-autoloaded printers */