- Fixed some issues with IPP Everywhere printer support (Issue #4893,
Issue #4909, Issue #4916, Issue #4921, Issue #4923, Issue #4932,
Issue #4933, Issue #4938)
+ - Optimized connection usage in the IPP backend
+ (<rdar://problem/29547323>)
- The scheduler did not detect when an encrypted connection was closed
by the client on Linux (Issue #4901)
- The cups-lpd program did not catch all legacy usage of ISO-8859-1
while (monitor->job_state < IPP_JOB_CANCELED && !job_canceled)
{
/*
- * Reconnect to the printer...
+ * Reconnect to the printer as needed...
*/
- if (!httpReconnect(http))
+ if (httpGetFd(http) < 0)
+ httpReconnect(http);
+
+ if (httpGetFd(http) >= 0)
{
/*
* Connected, so check on the printer state...
* No job-id yet, so continue...
*/
- goto monitor_disconnect;
+ goto monitor_sleep;
}
/*
(monitor->job_state == IPP_JOB_CANCELED ||
monitor->job_state == IPP_JOB_ABORTED))
job_canceled = -1;
-
- /*
- * Disconnect from the printer - we'll reconnect on the next poll...
- */
-
- monitor_disconnect:
-
- _httpDisconnect(http);
}
/*
* Sleep for N seconds...
*/
+ monitor_sleep:
+
sleep((unsigned)delay);
delay = _cupsNextDelay(delay, &prev_delay);
if (job_canceled > 0 && monitor->job_id > 0)
{
- if (!httpReconnect(http))
+ if (httpGetFd(http) < 0)
+ httpReconnect(http);
+
+ if (httpGetFd(http) >= 0)
{
cancel_job(http, monitor->uri, monitor->job_id, monitor->resource,
monitor->user, monitor->version);