]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - backend/ipp.c
Import CUPS v2.0.3
[thirdparty/cups.git] / backend / ipp.c
index 784b47044cb88351323397f76443dd45427fc3f5..b8be47a702f5ae4ca59ab59ddda8e104ce838175 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp.c 12048 2014-07-18 14:26:14Z msweet $"
+ * "$Id: ipp.c 12624 2015-05-06 23:50:20Z msweet $"
  *
  * IPP backend for CUPS.
  *
@@ -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? */
@@ -1396,6 +1397,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;
@@ -2336,6 +2338,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...
       */
@@ -2485,6 +2496,8 @@ monitor_printer(
       * Disconnect from the printer - we'll reconnect on the next poll...
       */
 
+      monitor_disconnect:
+
       _httpDisconnect(http);
     }
 
@@ -3756,5 +3769,5 @@ update_reasons(ipp_attribute_t *attr,     /* I - printer-state-reasons or NULL */
 }
 
 /*
- * End of "$Id: ipp.c 12048 2014-07-18 14:26:14Z msweet $".
+ * End of "$Id: ipp.c 12624 2015-05-06 23:50:20Z msweet $".
  */