Wykres commitów

47 Commity (0655b055552dabd679ccb7033159f92f94d646bf)

Autor SHA1 Wiadomość Data
Louis Lagendijk 43bca22e0c backend/sane_pixma.c: added missing return in case there is no error 2015-06-27 19:04:45 +02:00
Louis Lagendijk 50a85b744c Added backend version in debug output of pixma_bjnp.c 2015-06-27 18:19:31 +02:00
Louis Lagendijk b4856a8a31 pixma_bjnp.c: added explicit error message for the case where the
scanner closes the TCP-connection
2014-08-23 14:36:05 +02:00
Louis Lagendijk 3ce1cec6a3 pixma_bjnp.c: Open TCP-connection only from bjnp_activate. bjnp_open should not intiate
a connection. This solves issues where the scanner closes it's TCP-connection after a
period of no activity.
2014-08-23 14:25:56 +02:00
Mark Buda c591d2b7da Correction of some spelling/grammatical errors in source code 2014-05-15 22:04:37 -04:00
Louis Lagendijk ff7faa7964 pixma_bjnp.c: remove code and sanei_bjnp_activate/deactivate to make ADF scan work on MFNP protocol
Code is moved to sanei_bjnp_open/close instead. The FINISH command killed ADF scan
2014-02-12 00:16:34 +01:00
Louis Lagendijk bd851f2a3e pixma_bjnp.c: fix regression in bjnp support 2014-02-11 21:46:49 +01:00
Louis Lagendijk 77a1d1cdbc pixma_bjnp.c pixma_bjnp.h pixma_bjnp_private.h: Added support for Canon laser multi-functionals using the mfnp protool over port 8610.
Improved debug logging to be more reeadable
2014-02-10 23:53:04 +01:00
Nils Philippsen 101f76c516 pixma: document falling through to next switch case 2013-11-05 15:19:48 +01:00
Nils Philippsen 575f40a079 pixma: avoid buffer overflows 2013-11-05 15:12:20 +01:00
Nils Philippsen cf9129d62f pixma: u32tohex(): shift first, then cast to uint8_t 2013-11-05 14:54:13 +01:00
Nils Philippsen d35d6326cb pixmap: omitting curly braces considered harmful
The break being outside of the else block effectively made an if clause
out of the while loop. This caused long hostnames to not be shortened
sufficiently which subsequentely made strcpy() write beyond buffer
boundaries.
2013-10-29 14:14:18 +01:00
Louis Lagendijk bf0758bc8b Changed the pixma bjnp implementation to use its own debug environment
variable (SANE_DEBUG_BJNP) so debugging for the bjnp protocol and the
backend proper can be controlled independently.
Updated manpage for sane-pixma to document the above changes as well
as the changed scannner buttjn options and the fact the bjnp protocol
has added support for IPv6
2013-01-10 21:10:41 +01:00
Louis Lagendijk 8c7931cf89 Fixed issue where UDP ports were not closed in pixma_bjnp.c 2012-12-18 16:23:27 +01:00
Mattias Ellert ef7023ae13 Fix arguments to IPv6 macros 2012-10-22 16:49:32 +02:00
Louis Lagendijk 36e86bc6ff Cleanup of address structure.
Prefer FQDN over global address over link-local address for the scanner
2012-10-16 20:49:57 +02:00
Louis Lagendijk 5997295720 pixma_bjnp.c: use MDL instead of DES string as model for the scanner.
This avoids lookup mismatches due to unnessacary additions like "Canon" opr "Pixma" in the string
2012-09-08 20:47:03 +02:00
Louis Lagendijk 57d117a2d4 pixma_bjnp.c/pixma_bjnp_private.h:
sanei_bjnp_read_bulk() rewritten to be more readable
Solved issue where scanner returned 0 bytes available
2012-09-08 20:47:02 +02:00
Louis Lagendijk 7d6bd4d63c pixma_bjnp.c Corrected an read error in sanei_bjnp_read_bulk.
When the scanner reports no data, we need to send a new read request
2012-09-08 20:47:00 +02:00
Louis Lagendijk 9e68f66cc2 pixma_bjnp.c: Added more sockaddr support functions + some more re-factoring & clean-ups 2012-08-25 23:31:57 +02:00
Louis Lagendijk d929acb1b2 pixma_bjnp.c Added bjnp_sockaddr_t, a union that makes all explicit typecasts for sockaddr_xxx unnecessary
This makes the code much cleaner
2012-08-25 23:28:10 +02:00
Louis Lagendijk 177fde920c pixma_bjnp.c Minor code cleanups, add #defines for mosts hardcoded values 2012-08-25 23:27:53 +02:00
Louis Lagendijk 1b4cce5f2d pixma_bjnp.c Adeded scanner discovery for IPv6 2012-08-25 23:27:36 +02:00
Louis Lagendijk 62c2a094f9 pixma_bjnp.c: let prepare_socket determine destination for braodcast 2012-08-25 23:27:23 +02:00
Louis Lagendijk 3c693c66e5 pixma_bjnp.c: Move socket creation out of find_devices 2012-08-25 23:27:09 +02:00
Louis Lagendijk 2be2111a1a pixma_bjnp.c: some code cleanup
Use address from revfrom rather then the address returned n the discover response
Removed useless serial number code
Some refactoring to reduce the size of the find_devices() function: it is still too big
2012-08-25 23:26:49 +02:00
Louis Lagendijk d6040014df pixma_bjnp: added inintial ipv6 support 2012-08-25 23:26:35 +02:00
Louis Lagendijk f9a70e14be pixma_bjnp: add working scan button support 2012-08-25 23:25:49 +02:00
Louis Lagendijk fb1b31f82a pixma_bjnp.c Use a single socket for broadcasts so we can use a single port (8612) as well.
Right now we were not in compliance with the documentation that stated so.
This makes firewalling much easier.
2012-08-25 23:25:23 +02:00
Louis Lagendijk 750f2e2a09 pixma_bjnp.c: fix compiler warnings 2012-08-25 23:25:08 +02:00
Louis Lagendijk 0bcf1530e3 pixma_bjnp.c: Some buggy routers return a bogus name on a reverse name lookup.
Perform a forward lookup on the name and see if the returned ip-address matches
2012-08-25 23:24:55 +02:00
Rolf Bensch 66fb96d9ad Replace index() with strchr(). Bug #313563. 2012-03-06 11:10:44 +01:00
Nicolas Martin 92c44e905a pixma backend: few maintenance modifications.
- backend/pixma_bjnp.c:  print size_t values as %ld or %lx with cast to unsigned long
                         as prescribed in the file doc/backend_writing.txt, to avoid
                         compile warnings.
- backend/pixma_mp730.c: removed unused debug code.
2009-09-27 12:29:57 +02:00
Louis Lagendijk d214d08f1b 2009-03-06 Louis Lagendijk <llagendijk-guest at users.alioth.debian.org>
* backend/pixma_bjnp.c
        - silenced some debug statements during scanner detections
        - increased timeouts to 20 seconds as 10 seconds is apparently
        - not enough for the combination of a Mac and an MX850.
2009-03-31 19:07:26 +00:00
Louis Lagendijk 0086173dd3 2009-03-06 Louis Lagendijk <llagendijk-guest at users.alioth.debian.org>
* backend/pixma_bjnp.c backend/pixma_bjnp.h
        backend/pixma_bjnp_private.h backend/pixma_io_sanei.c:
        Make bjnp protocol more resilient against packet loss and corruption
        Changed timeout for all responses to be at least 10 seconds
        Send all broadcasts for scanner detection 5 times
        Made sure scanners are added to device list only once
        Changed device-id for bjnp so it uses scanner hostname/ip-address
        instead of mac address as this is more human friendly.
        To make room, use scanner model instead of USB-id (which is bogus
        for network scanners
2009-03-17 19:29:39 +00:00
Chris Bagwell b52b0c0c14 * backend/epson2.c backend/pixma_bjnp.c, include/sane/sanei_backend.h,
sanei/sanei_tcp.c, sanie/sanei_udp.c: Improve portablity by
  removing usage of MSG_WAITALL since not all platforms support
  that (cygwin).  Default is to be blocking anyways.  Changed
  usage of MSG_NOTWAIT to use fcntl() function as needed as well.
  * configure.in, lib/Makefile.in, lib/strcasestr.c: Add internal
  strcasestr() for platforms missing it (cygwin).
  * pixma_common.c: My source match header prototype for picky
  compilers (cygwin).
  * backend/umax_pp_mid.c: Allow BACKEND_NAME to be filename
  yet debug to be SANE_DEBUG_UMAX_PP to match man page.
2009-01-29 15:10:19 +00:00
Louis Lagendijk 9d7a8353b6 2009-01-27 Louis Lagendijk <llagendijk-guest at users.alioth.debian.org>
* backend/pixma_bjnp.c: fixed bug that caused scanner discovery to
        fail when it encountered a point to point link (check data returned
        by getifaddrs()
2009-01-27 20:13:11 +00:00
Louis Lagendijk 1b57825ef3 2009-01-13 Louis Lagendijk <llagendijk-guest at users.alioth.debian.org>
* backend/pixma_bjnp.c: send broadcasts from bjnp port to make
        firewalling easier
2009-01-13 22:00:32 +00:00
Louis Lagendijk 93daeb670f replaced getlogin/getenv by getpwuid(geteuid) as suggested by ulien BLACHE 2008-12-06 18:38:44 +00:00
Louis Lagendijk e9ede962ee backend/pixma_bjnp.c pixma_bjnp_private.h
On Ubuntu getlogin() returns NULL. So we noew first try getlogin()
and if that fails, we try getenv("USER") and if that fails we use
a defaul user string
2008-12-06 16:25:17 +00:00
Louis Lagendijk a1f9143a41 2008-10-31 Louis Lagendijk <llagendijk-guest at users.alioth.debian.org>
* Pixma backend (pixma.c/pixma_common.c/pixma_io_sanei.c/pixma_bjnp.c)
          bjnp tcp connection is now de-activated after initialization and
          re-activated at start of scanning. If we do not do this, the scanner
          closes its side of the connection after 30 secods of inactivity.
          Added a maximum to the retry of slect calls when signals are
          received
          Added blocksize detection for tcp read_bulk call
2008-11-05 20:53:30 +00:00
Louis Lagendijk ab53b7e884 2008-10-31 Louis Lagendijk <llagendijk-guest at users.alioth.debian.org>
* backend/pixma_bjnp.c corrected small typo
2008-10-31 22:57:33 +00:00
Louis Lagendijk 18ce7b4e0f 2008-10-31 Louis Lagendijk <llagendijk-guest at users.alioth.debian.org>
* backend/pixma_bjnp.c
           Added retry to select() calls when they get interrupted by a
           signal. This solves problems in xsane after a first scan completed.
           There is still an issue that scanner closes tcp connection after
           30 seconds of inactivity
           backend/pixma_bjnp.c backend/bjnp_private.h
           Marked local functions as static and removed them from ..private.h
2008-10-31 20:32:30 +00:00
Louis Lagendijk 69c9248356 2008-10-25 Louis Lagendijk <llagendijk-guest at users.alioth.debian.org>
* Added configuration  file support for pixma backend
        Currently used only for configuration of network scanners.
2008-10-25 14:56:11 +00:00
Louis Lagendijk 1b5f65b930 2008-10-21 Louis Lagendijk <llagendijk-guest at users.alioth.debian.org>
* Added #ifdef around defintions of MIN and MAX in pixma_common.h
        - Re-enable includes in pixma_bjnp.c as they are needed on Freebsd
        - Replaced getaddrinfo by gethostbyname in pixma_bjnp.c as this is
          supported on OS/2 as well
2008-10-21 21:37:34 +00:00
Nicolas Martin f573865c33 ifaddrs.h header check and increase backend version number 2008-10-18 22:26:57 +00:00
Nicolas Martin 391a6b4549 Added Canon's BJNP network protocol support, fix an ADF issue, updated doc and headers 2008-10-14 19:48:59 +00:00