-CHANGES - 2.2.5 - 2017-09-25
+CHANGES - 2.2.5 - 2017-10-02
============================
CHANGES IN CUPS V2.2.5
- The `ippCopyAttribute` function did not copy out-of-band values correctly
(rdar://33688003)
- Fixed the localization fallback code on macOS (rdar://33583699)
-- The `ipptool` program now offers an option to validate response headers.
+- The scheduler did not run with a high enough priority, causing problems on
+ busy systems (rdar://33789342)
- The `ipptool` program's `-P` option did not work correctly.
- The `ipptool` program did not compare URI scheme or hostname components
correctly for the WITH-ALL-HOSTNAMES, WITH-ALL-SCHEMES, WITH-HOSTNAME, or
if (cupsArrayCount(Clients) == MaxClients)
return;
+ cupsdSetBusyState(1);
+
/*
* Get a pointer to the next available client...
*/
if (httpGetFd(con->http) >= 0)
{
cupsArrayRemove(ActiveClients, con);
- cupsdSetBusyState();
+ cupsdSetBusyState(0);
#ifdef HAVE_SSL
/*
if (!cupsArrayFind(ActiveClients, con))
{
cupsArrayAdd(ActiveClients, con);
- cupsdSetBusyState();
+ cupsdSetBusyState(0);
}
case HTTP_STATE_OPTIONS :
else
{
cupsArrayRemove(ActiveClients, con);
- cupsdSetBusyState();
+ cupsdSetBusyState(0);
}
}
}
else
{
cupsArrayRemove(ActiveClients, con);
- cupsdSetBusyState();
+ cupsdSetBusyState(0);
}
}
}
xpc_transaction_begin();
#endif /* __APPLE__ */
-
/*
* Don't buffer the output...
*/
* Update the server "busy" state...
*/
- cupsdSetBusyState();
+ cupsdSetBusyState(0);
}
exit(errno);
}
+ /*
+ * Let the system know we are busy while we bring up cupsd...
+ */
+
+ cupsdSetBusyState(1);
+
/*
* Set the timezone info...
*/
else
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in background.");
+ cupsdSetBusyState(0);
+
/*
* Start any pending print jobs...
*/
<key>Label</key>
<string>org.cups.cups-lpd</string>
<key>ProcessType</key>
- <string>Background</string>
+ <string>Adaptive</string>
<key>EnableTransactions</key>
<true/>
<key>EnablePressuredExit</key>
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.cups.cupsd</string>
<key>ProcessType</key>
- <string>Background</string>
+ <string>Adaptive</string>
<key>EnableTransactions</key>
<true/>
<key>EnablePressuredExit</key>
<string>/usr/sbin/cupsd</string>
<string>-l</string>
</array>
- <!-- These environment variables are only used when CUPS is compiled with debug-printfs support -->
<key>EnvironmentVariables</key>
<dict>
<key>CUPS_DEBUG_LOG</key>
/*
* Server start/stop routines for the CUPS scheduler.
*
- * Copyright 2007-2012 by Apple Inc.
+ * Copyright 2007-2017 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
CUPSD_EVENT_SERVER_STARTED;
started = 1;
- cupsdSetBusyState();
+ cupsdSetBusyState(0);
}
/*
* System management functions for the CUPS scheduler.
*
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2017 by Apple Inc.
* Copyright 2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
DirtyFiles = CUPSD_DIRTY_NONE;
DirtyCleanTime = 0;
- cupsdSetBusyState();
+ cupsdSetBusyState(0);
}
if (!DirtyCleanTime)
DirtyCleanTime = time(NULL) + DirtyCleanInterval;
- cupsdSetBusyState();
+ cupsdSetBusyState(0);
}
*/
void
-cupsdSetBusyState(void)
+cupsdSetBusyState(int working) /* I - Doing significant work? */
{
int i; /* Looping var */
cupsd_job_t *job; /* Current job */
*/
newbusy = (DirtyCleanTime ? 1 : 0) |
- (cupsArrayCount(ActiveClients) ? 4 : 0);
+ ((working || cupsArrayCount(ActiveClients) > 0) ? 4 : 0);
for (job = (cupsd_job_t *)cupsArrayFirst(PrintingJobs);
job;
/*
* System management definitions for the CUPS scheduler.
*
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2017 by Apple Inc.
* Copyright 2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
extern void cupsdAllowSleep(void);
extern void cupsdCleanDirty(void);
extern void cupsdMarkDirty(int what);
-extern void cupsdSetBusyState(void);
+extern void cupsdSetBusyState(int working);
extern void cupsdStartSystemMonitor(void);
extern void cupsdStopSystemMonitor(void);