summaryrefslogtreecommitdiff
path: root/source3/printing/printer_list.c
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2010-12-28 15:54:54 +0100
committerJeremy Allison <jra@samba.org>2011-01-07 15:37:39 -0800
commit3e61c97a7e20a55be53f60c761091933ced53570 (patch)
treea2233c9403476befed018959c6d1b5ea448b73ef /source3/printing/printer_list.c
parentff577762b9cb37355f9433850b2119a6411e21da (diff)
downloadsamba-3e61c97a7e20a55be53f60c761091933ced53570.tar.gz
samba-3e61c97a7e20a55be53f60c761091933ced53570.tar.bz2
samba-3e61c97a7e20a55be53f60c761091933ced53570.zip
s3-printing: remove printer_list_need_refresh
printer_list_need_refresh() was used previously to ensure one smbd process did not attempt to update the printer_list tdb during or soon after update by another smbd. It is no longer needed, as pcap updates are now only performed by the parent smbd process following startup, SIGHUP, config update or printcap cache time expiry.
Diffstat (limited to 'source3/printing/printer_list.c')
-rw-r--r--source3/printing/printer_list.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/source3/printing/printer_list.c b/source3/printing/printer_list.c
index f3f00f0c0f..d36a746e45 100644
--- a/source3/printing/printer_list.c
+++ b/source3/printing/printer_list.c
@@ -215,32 +215,6 @@ done:
return status;
}
-bool printer_list_need_refresh(void)
-{
- NTSTATUS status;
- time_t last_refresh;
- int timediff;
-
- status = printer_list_get_last_refresh(&last_refresh);
- if (!NT_STATUS_IS_OK(status)) {
- return true;
- }
- timediff = time_mono(NULL) - last_refresh;
-
- if (timediff > 1 ) {
- /* if refresh occurred more than 1s (TODO:use lp_printcap_cache_time) ago,
- * then we need to refresh */
- return true;
- } else if (timediff < 0) {
- /* last_refresh newer than now. Seems we have no monotonic
- * clock and the clock was adjusted backwards.
- * we need to refresh which also resets last_refresh */
- return true;
- }
-
- return false;
-}
-
NTSTATUS printer_list_mark_reload(void)
{
struct db_context *db;