]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/main.c
Merge changes from CUPS 1.6svn-r10112.
[thirdparty/cups.git] / scheduler / main.c
index 0f4a711eaaf9b4da1e4a51b1b4f0b3db277bc514..7b7277175c5af075170aa794615498339162541f 100644 (file)
@@ -766,11 +766,9 @@ main(int  argc,                            /* I - Number of command-line args */
     * inactivity...
     */
 
-    if (timeout == 86400 && Launchd && LaunchdTimeout && !NumPolled &&
+    if (timeout == 86400 && Launchd && LaunchdTimeout &&
         !cupsArrayCount(ActiveJobs) &&
-       (!Browsing ||
-        (!BrowseRemoteProtocols &&
-         (!BrowseLocalProtocols || !cupsArrayCount(Printers)))))
+       (!Browsing || !BrowseLocalProtocols || !cupsArrayCount(Printers)))
     {
       timeout          = LaunchdTimeout;
       launchd_idle_exit = 1;
@@ -812,8 +810,6 @@ main(int  argc,                             /* I - Number of command-line args */
           i ++, lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
         cupsdLogMessage(CUPSD_LOG_EMERG, "Listeners[%d] = %d", i, lis->fd);
 
-      cupsdLogMessage(CUPSD_LOG_EMERG, "BrowseSocket = %d", BrowseSocket);
-
       cupsdLogMessage(CUPSD_LOG_EMERG, "CGIPipes[0] = %d", CGIPipes[0]);
 
 #ifdef __APPLE__
@@ -914,31 +910,6 @@ main(int  argc,                            /* I - Number of command-line args */
       expire_time = current_time;
     }
 
-   /*
-    * Update the browse list as needed...
-    */
-
-    if (Browsing)
-    {
-#ifdef HAVE_LIBSLP
-      if ((BrowseRemoteProtocols & BROWSE_SLP) &&
-          BrowseSLPRefresh <= current_time)
-        cupsdUpdateSLPBrowse();
-#endif /* HAVE_LIBSLP */
-
-#ifdef HAVE_LDAP
-      if ((BrowseRemoteProtocols & BROWSE_LDAP) &&
-          BrowseLDAPRefresh <= current_time)
-        cupsdUpdateLDAPBrowse();
-#endif /* HAVE_LDAP */
-    }
-
-    if (Browsing && current_time > browse_time)
-    {
-      cupsdSendBrowseList();
-      browse_time = current_time;
-    }
-
 #ifndef HAVE_AUTHORIZATION_H
    /*
     * Update the root certificate once every 5 minutes if we have client
@@ -1031,8 +1002,6 @@ main(int  argc,                           /* I - Number of command-line args */
                       cupsArrayCount(ActiveJobs));
       cupsdLogMessage(CUPSD_LOG_DEBUG, "Report: printers=%d",
                       cupsArrayCount(Printers));
-      cupsdLogMessage(CUPSD_LOG_DEBUG, "Report: printers-implicit=%d",
-                      cupsArrayCount(ImplicitPrinters));
 
       string_count = _cupsStrStatistics(&alloc_bytes, &total_bytes);
       cupsdLogMessage(CUPSD_LOG_DEBUG,
@@ -1512,10 +1481,8 @@ launchd_checkout(void)
   * shared printers to advertise...
   */
 
-  if (cupsArrayCount(ActiveJobs) || NumPolled ||
-      (Browsing &&
-       (BrowseRemoteProtocols ||
-        (BrowseLocalProtocols && cupsArrayCount(Printers)))))
+  if (cupsArrayCount(ActiveJobs) ||
+      (Browsing && BrowseLocalProtocols && cupsArrayCount(Printers)))
   {
     cupsdLogMessage(CUPSD_LOG_DEBUG,
                     "Creating launchd keepalive file \"" CUPS_KEEPALIVE
@@ -1773,7 +1740,6 @@ select_timeout(int fds)                   /* I - Number of descriptors returned */
   long                 timeout;        /* Timeout for select */
   time_t               now;            /* Current time */
   cupsd_client_t       *con;           /* Client information */
-  cupsd_printer_t      *p;             /* Printer information */
   cupsd_job_t          *job;           /* Job information */
   cupsd_subscription_t *sub;           /* Subscription information */
   const char           *why;           /* Debugging aid */
@@ -1847,54 +1813,6 @@ select_timeout(int fds)                  /* I - Number of descriptors returned */
       why     = "timeout a client connection";
     }
 
- /*
-  * Update the browse list as needed...
-  */
-
-  if (Browsing && BrowseLocalProtocols)
-  {
-#ifdef HAVE_LIBSLP
-    if ((BrowseLocalProtocols & BROWSE_SLP) && (BrowseSLPRefresh < timeout))
-    {
-      timeout = BrowseSLPRefresh;
-      why     = "update SLP browsing";
-    }
-#endif /* HAVE_LIBSLP */
-
-#ifdef HAVE_LDAP
-    if ((BrowseLocalProtocols & BROWSE_LDAP) && (BrowseLDAPRefresh < timeout))
-    {
-      timeout = BrowseLDAPRefresh;
-      why     = "update LDAP browsing";
-    }
-#endif /* HAVE_LDAP */
-
-    if ((BrowseLocalProtocols & BROWSE_CUPS) && NumBrowsers)
-    {
-      for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
-           p;
-          p = (cupsd_printer_t *)cupsArrayNext(Printers))
-      {
-       if (p->type & CUPS_PRINTER_REMOTE)
-       {
-         if ((p->browse_time + BrowseTimeout) < timeout)
-         {
-           timeout = p->browse_time + BrowseTimeout;
-           why     = "browse timeout a printer";
-         }
-       }
-       else if (p->shared && !(p->type & CUPS_PRINTER_IMPLICIT))
-       {
-         if (BrowseInterval && (p->browse_time + BrowseInterval) < timeout)
-         {
-           timeout = p->browse_time + BrowseInterval;
-           why     = "send browse update";
-         }
-       }
-      }
-    }
-  }
-
  /*
   * Write out changes to configuration and state files...
   */