--- cups-1.2.10/backend/runloop.c~ 2006-12-06 20:10:16.000000000 +0000 +++ cups-1.2.10/backend/runloop.c 2007-04-13 18:02:19.000000000 +0100 @@ -101,7 +101,7 @@ * 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... @@ -125,7 +125,7 @@ * 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); @@ -203,7 +203,7 @@ if (errno == ENOSPC) { - if (!paperout) + if (paperout != 1) { fputs("ERROR: Out of paper!\n", stderr); fputs("STATE: +media-empty-error\n", stderr); @@ -212,7 +212,7 @@ } else if (errno == ENXIO) { - if (!offline) + if (offline != 1) { fputs("STATE: +offline-error\n", stderr); fputs("INFO: Printer is currently off-line.\n", stderr);