#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)
|| (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;
}
}
}
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);
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.
****************************************************************************/
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,