]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Pending subscriptions would prevent the scheduler from idle exiting (STR #4754)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 11 Jan 2016 20:27:08 +0000 (20:27 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 11 Jan 2016 20:27:08 +0000 (20:27 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@13039 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-2.1.txt
backend/lpd.c
notifier/testnotify.c
scheduler/ipp.c
scheduler/main.c
scheduler/subscriptions.c
xcode/CUPS.xcodeproj/project.pbxproj

index 51c784e725d0d5b2690df8bc0e1bb31b62b2ac7c..2f60813df8c0ab59736dc488baa1da7bade3dc7e 100644 (file)
@@ -9,6 +9,8 @@ CHANGES IN CUPS V2.1.3
          (<rdar://problem/23255001>)
        - The EPL2 and ZPL sample drivers did not properly support the CutMedia
          option.
+       - Pending subscriptions would prevent the scheduler from idle exiting
+         (STR #4754)
 
 
 CHANGES IN CUPS V2.1.2
index d8ef9343b2bf36bd4adef5637acbc12b7c24abb8..41f14913e7313562dd0ed835f71c82fe1ffc01c5 100644 (file)
@@ -594,7 +594,7 @@ cups_rresvport(int *port,           /* IO - Port number to bind to */
   */
 
   memset(&addr, 0, sizeof(addr));
-  addr.addr.sa_family = family;
+  addr.addr.sa_family = (sa_family_t)family;
 
  /*
   * Try to bind the socket to a reserved port...
index c42bd84fc9f4eec0df9f2f9c7dff3d236f192dd6..a7b8df4a7e9315187e8424ca8ffbe66f7d89d963 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   Test notifier for CUPS.
  *
- *   Copyright 2007-2011 by Apple Inc.
+ *   Copyright 2007-2016 by Apple Inc.
  *   Copyright 1997-2005 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -115,7 +115,7 @@ print_attributes(ipp_t *ipp,                /* I - IPP request */
 
     ippAttributeString(attr, buffer, sizeof(buffer));
 
-    fprintf(stderr, "DEBUG: %*s%s (%s%s) %s", indent, "", attr->name,
+    fprintf(stderr, "DEBUG: %*s%s (%s%s) %s\n", indent, "", attr->name,
             attr->num_values > 1 ? "1setOf " : "",
            ippTagString(attr->value_tag), buffer);
   }
index 7a2fecd743081bf74fbc5e57eb28f89cfc434bde..fda29e60c41347169cce6ea726f7f8c02fd08177 100644 (file)
@@ -3,7 +3,7 @@
  *
  * IPP routines for the CUPS scheduler.
  *
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  * This file contains Kerberos support code, copyright 2006 by
@@ -7254,6 +7254,12 @@ get_subscription_attrs(
                   "get_subscription_attrs(con=%p[%d], sub_id=%d)",
                   con, con->number, sub_id);
 
+ /*
+  * Expire subscriptions as needed...
+  */
+
+  cupsdExpireSubscriptions(NULL, NULL);
+
  /*
   * Is the subscription ID valid?
   */
@@ -7403,6 +7409,12 @@ get_subscriptions(cupsd_client_t  *con,  /* I - Client connection */
     return;
   }
 
+ /*
+  * Expire subscriptions as needed...
+  */
+
+  cupsdExpireSubscriptions(NULL, NULL);
+
  /*
   * Copy the subscription attributes to the response using the
   * requested-attributes attribute that may be provided by the client.
index e03f88d790f6080480ef978fe74733d53e341485..0b171b5044d2dbe71208a46604c02c6cb39671e6 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Main loop for the CUPS scheduler.
  *
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  * These coded instructions, statements, and computer programs are the
@@ -1573,7 +1573,6 @@ select_timeout(int fds)                   /* I - Number of descriptors returned */
   time_t               now;            /* Current time */
   cupsd_client_t       *con;           /* Client information */
   cupsd_job_t          *job;           /* Job information */
-  cupsd_subscription_t *sub;           /* Subscription information */
   const char           *why;           /* Debugging aid */
 
 
@@ -1710,19 +1709,6 @@ select_timeout(int fds)                  /* I - Number of descriptors returned */
   }
 #endif /* HAVE_MALLINFO */
 
- /*
-  * Expire subscriptions as needed...
-  */
-
-  for (sub = (cupsd_subscription_t *)cupsArrayFirst(Subscriptions);
-       sub;
-       sub = (cupsd_subscription_t *)cupsArrayNext(Subscriptions))
-    if (!sub->job && sub->expire && sub->expire < timeout)
-    {
-      timeout = sub->expire;
-      why     = "expire subscription";
-    }
-
  /*
   * Adjust from absolute to relative time.  We add 1 second to the timeout since
   * events occur after the timeout expires, and limit the timeout to 86400
index fd1d80e21e87b0c00659c87e16f1eddac8d0262b..ff14f45b04f0ddaa2084bc42b01ef4e2d630475e 100644 (file)
@@ -657,6 +657,8 @@ cupsdExpireSubscriptions(
   curtime = time(NULL);
   update  = 0;
 
+  cupsdLogMessage(CUPSD_LOG_INFO, "Expiring subscriptions...");
+
   for (sub = (cupsd_subscription_t *)cupsArrayFirst(Subscriptions);
        sub;
        sub = (cupsd_subscription_t *)cupsArrayNext(Subscriptions))
index c8c3bcfcecf3415f081f00aca259b0548183097d..9b9b93322b9a05f3a1121d64308e4bed2a0d6edc 100644 (file)
                72BF96371333042100B1EAD7 /* Project object */ = {
                        isa = PBXProject;
                        attributes = {
-                               LastUpgradeCheck = 0710;
+                               LastUpgradeCheck = 0730;
                                ORGANIZATIONNAME = "Apple Inc.";
                                TargetAttributes = {
                                        27A0347A1A8BDB1200650675 = {