]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The backends now manage the printer-state-reasons attribute more
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 16 Apr 2007 14:26:36 +0000 (14:26 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 16 Apr 2007 14:26:36 +0000 (14:26 +0000)
accurately (STR #2345)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@6455 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.2.txt
backend/runloop.c

index 482cb6660b23e474018d3a927e709af6b3ec175f..31962147c18ebca98730981473d1e3ad4f61f6ac 100644 (file)
@@ -3,6 +3,8 @@ CHANGES-1.2.txt
 
 CHANGES IN CUPS V1.2.11
 
+       - The backends now manage the printer-state-reasons
+         attribute more accurately (STR #2345)
        - Java, PHP, Perl, and Python scripts did not work
          properly (STR #2342)
        - The scheduler would take forever to start if the
index 21c9192bb0c60e917e1d8df1eba7c076980cfb5c..f31278648e3d41041a592383306a695b47c5d229 100644 (file)
@@ -104,7 +104,8 @@ backendRunLoop(
   * Now loop until we are out of data from print_fd...
   */
 
-  for (print_bytes = 0, print_ptr = print_buffer, offline = 0, paperout = 0, total_bytes = 0;;)
+  for (print_bytes = 0, print_ptr = print_buffer, offline = -1,
+           paperout = -1, total_bytes = 0;;)
   {
    /*
     * Use select() to determine whether we have data to copy around...
@@ -130,7 +131,7 @@ backendRunLoop(
        * Pause printing to clear any pending errors...
        */
 
-       if (errno == ENXIO && !offline)
+       if (errno == ENXIO && offline != 1)
        {
          fputs("STATE: +offline-error\n", stderr);
          fputs(_("INFO: Printer is currently off-line.\n"), stderr);
@@ -215,7 +216,7 @@ backendRunLoop(
 
         if (errno == ENOSPC)
        {
-         if (!paperout)
+         if (paperout != 1)
          {
            fputs("STATE: +media-empty-error\n", stderr);
            fputs(_("ERROR: Out of paper!\n"), stderr);
@@ -224,7 +225,7 @@ backendRunLoop(
         }
        else if (errno == ENXIO)
        {
-         if (!offline)
+         if (offline != 1)
          {
            fputs("STATE: +offline-error\n", stderr);
            fputs(_("INFO: Printer is currently off-line.\n"), stderr);