~ubuntu-branches/ubuntu/oneiric/cups/oneiric

« back to all changes in this revision

Viewing changes to backend/runloop.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2010-04-09 16:19:16 UTC
  • mto: (25.1.2 lucid) (55.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20100409161916-k0e6prz52ubf4vlg
Tags: upstream-1.4.3
ImportĀ upstreamĀ versionĀ 1.4.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * "$Id: runloop.c 8807 2009-08-31 18:45:43Z mike $"
 
2
 * "$Id: runloop.c 8896 2009-11-20 01:27:57Z mike $"
3
3
 *
4
4
 *   Common run loop APIs for the Common UNIX Printing System (CUPS).
5
5
 *
147
147
    int         snmp_fd,                /* I - SNMP socket or -1 if none */
148
148
    http_addr_t *addr,                  /* I - Address of device */
149
149
    int         use_bc,                 /* I - Use back-channel? */
 
150
    int         update_state,           /* I - Update printer-state-reasons? */
150
151
    int         (*side_cb)(int, int, int, http_addr_t *, int))
151
152
                                        /* I - Side-channel callback */
152
153
{
245
246
        * Pause printing to clear any pending errors...
246
247
        */
247
248
 
248
 
        if (errno == ENXIO && offline != 1)
 
249
        if (errno == ENXIO && offline != 1 && update_state)
249
250
        {
250
251
          fputs("STATE: +offline-report\n", stderr);
251
252
          _cupsLangPuts(stderr, _("INFO: Printer is currently offline.\n"));
351
352
 
352
353
        if (errno == ENOSPC)
353
354
        {
354
 
          if (paperout != 1)
 
355
          if (paperout != 1 && update_state)
355
356
          {
356
357
            fputs("STATE: +media-empty-warning\n", stderr);
357
358
            _cupsLangPuts(stderr, _("ERROR: Out of paper!\n"));
360
361
        }
361
362
        else if (errno == ENXIO)
362
363
        {
363
 
          if (offline != 1)
 
364
          if (offline != 1 && update_state)
364
365
          {
365
366
            fputs("STATE: +offline-report\n", stderr);
366
367
            _cupsLangPuts(stderr, _("INFO: Printer is currently off-line.\n"));
376
377
      }
377
378
      else
378
379
      {
379
 
        if (paperout)
 
380
        if (paperout && update_state)
380
381
        {
381
382
          fputs("STATE: -media-empty-warning\n", stderr);
382
383
          paperout = 0;
383
384
        }
384
385
 
385
 
        if (offline)
 
386
        if (offline && update_state)
386
387
        {
387
388
          fputs("STATE: -offline-report\n", stderr);
388
389
          _cupsLangPuts(stderr, _("INFO: Printer is now online.\n"));
419
420
 
420
421
 
421
422
/*
422
 
 * End of "$Id: runloop.c 8807 2009-08-31 18:45:43Z mike $".
 
423
 * End of "$Id: runloop.c 8896 2009-11-20 01:27:57Z mike $".
423
424
 */