]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix another bug in the new logging code (STR #4687)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 10 Aug 2015 17:26:07 +0000 (17:26 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 10 Aug 2015 17:26:07 +0000 (17:26 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12842 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES.txt
scheduler/log.c

index 4da7ab80a3d3f487b6084a21d20e8fded28f1516..3a6dc4ebbe1e72a93c141b3fef9d8e6983403e62 100644 (file)
@@ -1,9 +1,10 @@
-CHANGES.txt - 2.1.0 - 2015-08-06
+CHANGES.txt - 2.1.0 - 2015-08-10
 --------------------------------
 
 CHANGES IN CUPS V2.1.0
 
-       - Support new Chinese locale IDs and their correct fallback locales
+       - Fixed one more scheduler crash bug in the new logging code (STR #4687)
+       - Now support new Chinese locale IDs and their correct fallback locales
          (<rdar://problem/22086642>, <rdar://problem/22130168>)
        - "make check" incorrectly reported an expectation of 18 warning
          messages when 8 were expected (STR #4684)
index cef021941788fdef331b2eaaa7f5275846f30208..e606905296b84dc22784b7ea589d7936cb5ad788 100644 (file)
@@ -617,7 +617,7 @@ cupsdLogJob(cupsd_job_t *job,               /* I - Job */
 
       asl_set(m, PWG_Event, "JobStateChanged");
       asl_set(m, PWG_JobID, job_id);
-      asl_set(m, PWG_JobState, job_states[job->state_value - IPP_JSTATE_PENDING]);
+      asl_set(m, PWG_JobState, job->state_value < IPP_JSTATE_PENDING ? "" : job_states[job->state_value - IPP_JSTATE_PENDING]);
 
       if (job->impressions)
       {
@@ -667,7 +667,7 @@ cupsdLogJob(cupsd_job_t *job,               /* I - Job */
                      PWG_Event"=JobStateChanged",
                      PWG_ServiceURI"=%s", printer ? printer->uri : "",
                      PWG_JobID"=%d", job->id,
-                     PWG_JobState"=%s", job_states[job->state_value - IPP_JSTATE_PENDING],
+                     PWG_JobState"=%s", job->state_value < IPP_JSTATE_PENDING ? "" : job_states[job->state_value - IPP_JSTATE_PENDING],
                      PWG_JobImpressionsCompleted"=%d", ippGetInteger(job->impressions, 0),
                      NULL);
     else