Revert "s3-printing: update parent smbd pcap cache"
authorKarolin Seeger <kseeger@samba.org>
Sat, 15 Jan 2011 18:06:42 +0000 (19:06 +0100)
committerKarolin Seeger <kseeger@samba.org>
Sat, 15 Jan 2011 18:06:42 +0000 (19:06 +0100)
This reverts commit 2c2ce9caead5a13edb582313b7d36c7eb12a09fb.

source3/include/local.h
source3/smbd/process.c
source3/smbd/server.c

index d65cc001a91d99158885df62120626d973175949..a88b17be137353194e64674829ee78194a5992f9 100644 (file)
 #define LPQ_LOCK_TIMEOUT (5)
 #define NMBD_INTERFACES_RELOAD (120)
 #define NMBD_UNEXPECTED_TIMEOUT (15)
-#define SMBD_HOUSEKEEPING_INTERVAL SMBD_SELECT_TIMEOUT
 
 /* the following are in milliseconds */
 #define LOCK_RETRY_TIMEOUT (100)
index 4b2e6eb79c26bae105f3940aa637088c0e468460..2abea8f4bcc3fd96d30a0f7f3331f8fb810687c9 100644 (file)
@@ -1854,7 +1854,7 @@ void check_reload(time_t t)
                        || (t-last_printer_reload_time  < 0) ) 
                {
                        DEBUG( 3,( "Printcap cache time expired.\n"));
-                       pcap_cache_reload(&reload_printers);
+                       reload_printers();
                        last_printer_reload_time = t;
                }
        }
@@ -2123,7 +2123,7 @@ void smbd_process(void)
        }
 
        if (!(event_add_idle(smbd_event_context(), NULL,
-                            timeval_set(SMBD_HOUSEKEEPING_INTERVAL, 0),
+                            timeval_set(SMBD_SELECT_TIMEOUT, 0),
                             "housekeeping", housekeeping_fn, NULL))) {
                DEBUG(0, ("Could not add housekeeping event\n"));
                exit(1);
index d393f26d51c4ee223fde9d5f4e5457229ed5b0d8..2c5ce4008549c3494b9ae53f269e422bd73f2304 100644 (file)
@@ -498,14 +498,6 @@ static bool smbd_open_one_socket(struct smbd_parent_context *parent,
        return true;
 }
 
-static bool parent_housekeeping_fn(const struct timeval *now, void *private_data)
-{
-       DEBUG(5, ("houskeeping\n"));
-       /* check if we need to reload services */
-       check_reload(time(NULL));
-       return true;
-}
-
 /****************************************************************************
  Open the socket communication.
 ****************************************************************************/
@@ -633,14 +625,6 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent,
        claim_connection(NULL,"",
                         FLAG_MSG_GENERAL|FLAG_MSG_SMBD|FLAG_MSG_DBWRAP);
 
-       if (!(event_add_idle(smbd_event_context(), NULL,
-                            timeval_set(SMBD_HOUSEKEEPING_INTERVAL, 0),
-                            "parent_housekeeping", parent_housekeeping_fn,
-                            parent))) {
-               DEBUG(0, ("Could not add housekeeping event\n"));
-               exit(1);
-       }
-
         /* Listen to messages */
 
        messaging_register(smbd_messaging_context(), NULL,