]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The IPP backend now correctly monitors jobs (<rdar://problem/20495955>)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 6 May 2015 23:50:10 +0000 (23:50 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 6 May 2015 23:50:10 +0000 (23:50 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12623 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-2.0.txt
backend/ipp.c

index 0f58789f3f11a21ec324da71fe6ec57379196c26..01326f19dc463bead27c1ee1c360cf13f85a0d00 100644 (file)
@@ -19,6 +19,8 @@ CHANGES IN CUPS V2.0.3
          (STR #4603)
        - The scheduler could get caught in a busy loop (STR #4605)
        - The sample Epson driver could crash (STR #4616)
+       - The IPP backend now correctly monitors jobs
+         (<rdar://problem/20495955>)
        - Added Russian translation (STR #4577)
 
 
index dc7d8bb7db5b786e4f0a88e790c822ce66a848c0..8c8d1ddf7b6db6a68e128df6008bae60bc9370a4 100644 (file)
@@ -64,6 +64,7 @@ typedef struct _cups_monitor_s                /**** Monitoring data ****/
                        version,        /* IPP version */
                        job_id,         /* Job ID for submitted job */
                        job_reasons,    /* Job state reasons bits */
+                       create_job,     /* Support Create-Job? */
                        get_job_attrs;  /* Support Get-Job-Attributes? */
   const char           *job_name;      /* Job name for submitted job */
   http_encryption_t    encryption;     /* Use encryption? */
@@ -1404,6 +1405,7 @@ main(int  argc,                           /* I - Number of command-line args */
   monitor.port          = port;
   monitor.version       = version;
   monitor.job_id        = 0;
+  monitor.create_job    = create_job;
   monitor.get_job_attrs = get_job_attrs;
   monitor.encryption    = cupsEncryption();
   monitor.job_state     = IPP_JOB_PENDING;
@@ -2344,6 +2346,15 @@ monitor_printer(
       if (cupsLastError() <= IPP_OK_CONFLICT)
         password_tries = 0;
 
+      if (monitor->job_id == 0 && monitor->create_job)
+      {
+       /*
+        * No job-id yet, so continue...
+       */
+
+        goto monitor_disconnect;
+      }
+
      /*
       * Check the status of the job itself...
       */
@@ -2495,6 +2506,8 @@ monitor_printer(
       * Disconnect from the printer - we'll reconnect on the next poll...
       */
 
+      monitor_disconnect:
+
       _httpDisconnect(http);
     }