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.
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
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
- 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.
* 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.
* 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
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.
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
* 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
* 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
* 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