~ubuntu-branches/ubuntu/natty/cups/natty

« back to all changes in this revision

Viewing changes to backend/parallel.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-09-15 11:30:07 UTC
  • mto: (12.1.3 sid) (14.1.1 sid) (25.1.2 lucid)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20090915113007-1gngzbskotfxronq
Tags: upstream-1.4.1
ImportĀ upstreamĀ versionĀ 1.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * "$Id: parallel.c 8169 2008-12-08 21:08:01Z mike $"
 
2
 * "$Id: parallel.c 8807 2009-08-31 18:45:43Z mike $"
3
3
 *
4
4
 *   Parallel port backend for the Common UNIX Printing System (CUPS).
5
5
 *
59
59
 */
60
60
 
61
61
static void     list_devices(void);
62
 
static void     side_cb(int print_fd, int device_fd, int snmp_fd,
 
62
static int      side_cb(int print_fd, int device_fd, int snmp_fd,
63
63
                        http_addr_t *addr, int use_bc);
64
64
 
65
65
 
615
615
 * 'side_cb()' - Handle side-channel requests...
616
616
 */
617
617
 
618
 
static void
 
618
static int                              /* O - 0 on success, -1 on error */
619
619
side_cb(int         print_fd,           /* I - Print file */
620
620
        int         device_fd,          /* I - Device file */
621
621
        int         snmp_fd,            /* I - SNMP socket (unused) */
634
634
  datalen = sizeof(data);
635
635
 
636
636
  if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
637
 
  {
638
 
    _cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
639
 
    return;
640
 
  }
 
637
    return (-1);
641
638
 
642
639
  switch (command)
643
640
  {
680
677
        break;
681
678
  }
682
679
 
683
 
  cupsSideChannelWrite(command, status, data, datalen, 1.0);
 
680
  return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
684
681
}
685
682
 
686
683
 
687
684
/*
688
 
 * End of "$Id: parallel.c 8169 2008-12-08 21:08:01Z mike $".
 
685
 * End of "$Id: parallel.c 8807 2009-08-31 18:45:43Z mike $".
689
686
 */