Wykres commitów

181 Commity (f1706e240d414cd28ca7f0c93e4d59618b26ff7b)

Autor SHA1 Wiadomość Data
m. allan noah 084a18b0c4 remove undocumented and otherwise unused SANE_CAP_ALWAYS_SETTABLE 2008-05-21 01:20:35 +00:00
Julien BLACHE fde1551f68 Fix typo. 2008-04-13 14:21:59 +00:00
Julien BLACHE eff4892c1c Restrict protocol for service announcement/browsing/resolution to IPv4
unless IPv6 is enabled.
2008-04-11 17:43:16 +00:00
Julien BLACHE f4ff1b74f6 Add mDNS DNS-SD support to saned and the net backend so they can announce
and discover each other automatically.

Optional at configure time, requires Avahi >= 0.6.4.
2008-04-11 17:18:19 +00:00
Julien BLACHE 90a1c88e0d saned can now drop privileges when running in standalone mode. 2008-04-10 16:55:36 +00:00
Julien BLACHE cbb3833dbe Add a PID file. 2008-04-10 16:39:06 +00:00
Julien BLACHE ce7efefec7 Replace daemon() with an open-coded equivalent. 2008-04-10 16:31:17 +00:00
Julien BLACHE 26ffc6a211 Debug mode: close all sockets once we have accepted a connection. 2008-04-06 17:27:39 +00:00
Julien BLACHE f3756baa4a Close open file descriptors appropriately when spawning child process. 2008-04-06 17:23:36 +00:00
Julien BLACHE 9c6fea1943 Add standalone daemon mode, building upon the AF-indep/IPv6 debug mode.
Reorganize code by splitting the main() function into a series of functions.
Factorize common code between the old network code and the AF-indep code. There's now only one version of main().
2008-04-06 15:21:47 +00:00
Julien BLACHE ef2838234e Improve comment, once again. 2008-04-06 10:18:16 +00:00
Julien BLACHE 2330d122e0 Fix typo in comment. 2008-03-20 21:48:26 +00:00
Julien BLACHE 5ba1b2b917 Fix messages around getservbyname() in the IPv4 code to mention "sane-port" instead of "sane". 2008-03-20 21:47:14 +00:00
Mattias Ellert 22efa538b7 Fix warnings about ignored --datarootdir 2008-02-03 06:59:36 +00:00
m. allan noah 09f523defe remove support for SANE_FRAME_JPEG, add other frame types but commented out 2007-12-29 21:36:25 +00:00
m. allan noah b2666cada5 scanimage: bugfix, dont round up negative user input values
fujitsu.desc: add/consolidate new models
2007-08-08 12:46:02 +00:00
m. allan noah c8e8f2c41a scanimage.c: add default: blocks to switch statements so recent gcc will shutup
fujitsu.[ch]: update to backend v1.0.52:
- remove unused jpeg function
- reactivate look-up-table based brightness and contrast options
- change range of hardware brightness/contrast to match LUT versions
- call send_lut() from sane_control_option instead of sane_start
2007-07-31 18:07:53 +00:00
m. allan noah e343cc59cf * backend/fujitsu.[ch], backend/fujitsu-scsi.h: update to v1.0.50,
add JPEG support, usb command sending and scan params cleanups
* include/sane/sane.h: add SANE_FRAME_JPEG
* frontend/scanimage.c: dont crash on unknown frame types
2007-07-10 16:07:25 +00:00
Oliver Rauch 5b38d6f1d6 *** empty log message *** 2007-03-17 15:51:54 +00:00
Henning Geinitz 6bff1fdf4b Added examples on how to set the scan area in the manual page (bug
#303802). Mention how to separate parameters from options in --help and manpage
(bug #303819).
2006-10-03 18:39:35 +00:00
Jon Chambers b6f25c8971 flush the output buffer after each page (help prevent lost data on ctrl-C) 2006-06-15 20:10:15 +00:00
m. allan noah e5bb981d6a move sane_cancel outside of tight loop, only done at end of batch 2006-06-09 13:04:06 +00:00
Henning Geinitz de2c4fb484 If saned does not find any config file, it calls fclose with a NULL FILE*. The
code may also leak open file descriptors and FILE's if multiple config files are
found. (bug #303339). Fixed possible segfault on close_handle() (bug #303338).
2006-04-09 10:07:18 +00:00
Henning Geinitz 56ba575749 Don't create and delete a file in batch mode if the document feeder is empty or
if CTRL-D is pressed in prompt mode. This change avoids deleting existing
files. For an explanation, see bug #302797.
2006-01-02 23:00:23 +00:00
Henning Geinitz 947339db25 Run "makedepend" if it's available. This way "make" builds
backends correctly even if only included files (e.g. headers) are
	  changed. Don't be too verbose when running makedepend.
	  Create links libsane-*.so.1 to the real library files if the
	  links are not there. This fixes dynamic loading on OpenBSD. The
	  links are not created for MacOS X as they don't work there.
	  Remove any libsane.* links in /usr/local/lib/sane. Such links
	  are created by libtool. As they point to libsane-v4l.so,
	  scanimage -L doesn't find any scanner in case of ld.so
	  misconfigurations.
	  The install target is much quiter now and prints the libtool
	  message only once now.
2005-10-29 20:01:54 +00:00
Henning Geinitz 881756aff9 Added vendor "Lexmark". 2005-10-16 17:19:21 +00:00
Henning Geinitz 38087da06a Use correct size for fgets. Patch from Antoine Jacoutot <ajacoutot@lphp.org>. 2005-10-06 19:11:09 +00:00
Henning Geinitz e3e00e9d91 Added progress indicator to scanimage (based on patch from Mario Goppold
<mgoppold@tbz-pariv.de>). Updated copyright information, added links to
sane-devel mailing list.
2005-09-23 12:05:51 +00:00
Henning Geinitz 3ae9b03454 Don't exit with error when trying to set inactive options. This especially
happens in connection with geometry options and the v4l backend (bugs #300321,
#301977).
2005-08-14 14:51:06 +00:00
Henning Geinitz 6c3427c52d Changes to support SANE on ZETA. Not all
patches have been applied yet, but it's a start. The backends
	  are not installed as shared libs but as add-ons, which are shared libs
	  but in a specific folder in [/system|~]/config/add-ons/ named SANE/.
	  The install target has been changed to account for this,
	  Some files don't exist in BeOS/ZETA (ipc.h, ...).
	  Bbackend function names get a prefix, I suppose to avoid namespace clashes.
	  Though we do have a libdl to implement dl_open, the native way is prefered.
	  Added a --with-docdir= configure arg.
	  BeOS has a broken get[name|addr]info() from bind. This is fixed in ZETA R1.
	  libtool needs -no-undefined. Various VPATH fixes.
	  Check for <be/drivers/USB_scanner.h>, but not used yet.
	  No S_IFSOCK (sockets are fds to /dev/net/api). Stub pio code, untested.
	  Patch from Francois Revol <revol@free.fr>.
2005-07-15 21:59:25 +00:00
Frank Zago 483e472841 New email address. 2005-07-07 11:55:43 +00:00
Mattias Ellert 23b39a25f1 Missing braces 2005-04-28 12:49:01 +00:00
Gerard Klaver e9e045a44b -split up printf command to remove warning ISO C89 (string length > 509)
-patch for bugreport 300160, ranges for width and height are wrong

-added option -B -buffersize so instead of default input buffer of
32*1024 a buffer of 1024*1024 can be chosen, so for vidcams for example
640x480, usb 2.0, 30fps less time is needed to fill input buffer.
2005-04-15 21:09:56 +00:00
Henning Geinitz ee71d11e42 Fixed NULL string crash. 2004-10-16 13:49:16 +00:00
Julien BLACHE 746faf32c9 More auth_callback() fixes, although these ones aren't critical. 2004-09-05 09:27:28 +00:00
Julien BLACHE 91051e826f * frontend/saned.c: auth_callback(): arrays are passed as pointers, declaring parameters as arrays of fixed size is useless. memset() the correct length, not sizeof(pointer).
Caught while testing splint on the SANE sources, potential information leakage.
2004-09-01 21:03:35 +00:00
Frank Zago bf8369276c fixed a couple bugs. 2004-08-14 17:33:20 +00:00
Julien BLACHE c5f9d0d711 * frontend/scanimage.c: Added the possibility to cleanly stop a batch by pressing Ctrl+D when using --batch-prompt. 2004-07-31 17:26:02 +00:00
Henning Geinitz 7751b3b7eb Changed service name from "sane" to "sane-port". This is the
IANA registered service name for port 6566 (bug #300758).
2004-06-02 18:38:28 +00:00
Henning Geinitz 524d3f3c47 Added checks for bad handles for SANE_NET_CLOSE and SANE_NET_CANCEL. This is
intended to stop saned from segfaulting when a bad handle is used.
2004-03-03 19:13:04 +00:00
Henning Geinitz a2e686d667 Added support for asking for pressing a key before scanning a page in a batch
scan. Patch from Dominik Fischer <dom_fischer@web.de>.
2004-02-22 11:17:49 +00:00
Julien BLACHE 725e1c1940 * frontend/saned.c: Use strcasecmp() instead of strcmp() when matching IPv6 addresses. 2003-12-13 16:40:57 +00:00
Julien BLACHE 3d843bab44 * frontend/saned.c: fixed endianness issues in check_v{4,6}_in_range(), also
fixed portability issues to other UNIX platforms due to different representations
of IPv6 addresses.
2003-11-02 13:54:21 +00:00
Julien BLACHE e54e51f586 Forgot one of the two in_addr_t declarations, now replaced the
second one too (s/in_addr_t/u_int32_t/).
2003-10-22 19:44:14 +00:00
Julien BLACHE 97496000ce * frontend/saned.c: replaced in_addr_t mask; by u_int32_t mask; in
check_v4_in_range(). in_addr_t doesn't seem to exist on OS/2, and
it's nothing more than an unsigned 32 bits integer.
2003-10-22 16:58:58 +00:00
Julien BLACHE 9695362397 * frontend/saned.c: added subnet support to saned ; added
check_v4_in_range and check_v6_in_range functions.
* backend/saned.conf: updated the config file.
* doc/saned.man: updated the manpage for saned.
2003-10-19 10:36:28 +00:00
Henning Geinitz a4e842d946 Minor cleanup from the jpeg move. Reverted frontend link order. 2003-07-26 21:40:06 +00:00
Peter Fales 3b3bd83e17 Need to reorder libs to get static build to work 2003-07-26 18:27:05 +00:00
Henning Geinitz b59fc7f95a Updated email address of Andreas Beck. 2003-07-26 09:33:21 +00:00
Henning Geinitz 494e6a1cf4 When parsing string options whose arguments are too short, don't overwrite the
remaining command line arguments. Print "[inactive]" after every inactive
option.
2003-07-19 14:23:31 +00:00
Henning Geinitz 64ea3dfc5f Check if ss_family or __ss_family is in struct sockaddr_storage. Otherwise
diasbale ipv6. Patch from Julien BLACHE <jb@jblache.org>.
2003-06-04 19:49:48 +00:00
Henning Geinitz 562c9192ec Use u_int_* instead of uint_*. That fixes compilation for MacOS X (hopefully). 2003-05-26 23:34:07 +00:00
Henning Geinitz d3322e4519 Replaces a strncmp() call by a macro detecting V4-mapped address. This is a
lot safer than the strncmp, and doesn't break anything. Patch from Julien
BLACHE <jb@jblache.org>.
2003-05-12 16:40:05 +00:00
Henning Geinitz 0fc0f3f253 Added implementation of poll() for systems that don't provide it (patch from
Julien BLACHE <jb@jblache.org>).
2003-05-04 12:58:22 +00:00
Henning Geinitz 2fca468542 Remove -all_load again and try to use the correct link order for
libraries.
2003-05-03 20:48:15 +00:00
Henning Geinitz f642328f0f Try to get the correct port number when /etc/services doesn't list "sane" by
asking for "6566". Check result of socket(). Print ip faimily and port.
2003-05-03 20:43:04 +00:00
Henning Geinitz 69a101ef06 Add -all_load to linker flags on MacOS X to avoid linker errors. 2003-05-02 21:58:57 +00:00
Henning Geinitz e93322e28d Test for poll() and disable IPV6 if not found. 2003-05-02 09:41:12 +00:00
Henning Geinitz 749ceed2e6 Added a switch to disable libusb. Removed switch to enable ipv6
uncondinionally.  Check for sys/poll.h.
2003-04-02 16:21:07 +00:00
Henning Geinitz 966e3536da Include poll.h only if new saned code is used. Fixes compilation on
OS/2. Patch from Julien BLACHE <jb@jblache.org>.
2003-03-31 16:15:10 +00:00
Henning Geinitz 088281c4e1 Added support for IPv6. Updated manpages. Patch from Julien BLACHE
<jb@jblache.org>.
2003-03-30 19:07:18 +00:00
Frank Zago 711d1bb348 Added more sane_init/sane_exit tests. Added Fujistu and Relisys to the list of valid vendor names. 2003-02-22 19:41:08 +00:00
Henning Geinitz e3ceee04be Check the IP address of the remote host before any communication occurs.
Check for a errors before trsuting values that came from remote.  Make sure
that strings are 0-terminated.
2003-02-09 11:23:41 +00:00
Henning Geinitz 54faada982 Fixed severe bug in saned that allowed a remote frontend to crash saned (null
pointer derefence) if no scanners are connected.
2003-01-29 17:41:53 +00:00
Henning Geinitz 8088d3e59b Print version number. 2003-01-04 15:24:13 +00:00
Oliver Rauch 31d6f428e1 Oliver Rauch: added fclose(icc_file) to stiff.c 2002-11-29 17:06:36 +00:00
Henning Geinitz 85e0bb2735 Added option --dont-scan. Resorted usage output. 2002-09-11 19:20:43 +00:00
Oliver Rauch d054ded6c1 2002-08-18 Oliver Rauch <Oliver.Rauch@rauch-domain.de>
* frontend/scanimage.c, frontend/stiff.h, frontend/stiff.c:
          Added option "-i filename"/"--icc-profile filename":
          When image is saved in tiff format then this icc-profile is
          added to the tiff file as tiff tag
2002-08-27 17:57:19 +00:00
Henning Geinitz df8b2a8460 Fixed 16 bit tiff output.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-07-24 19:41:34 +00:00
Henning Geinitz e96e066c2f Fail if there are arguments without a preceding option on the command line.
Fixed indenting.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-07-22 12:49:26 +00:00
Henning Geinitz 1bdbbf495f Use LIBS = @LIBS@ to make sure that -lsyslog and -lsocket are linked for OS/2.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-07-08 18:07:07 +00:00
Frank Zago 8ef5b16e85 add test for long long. 2002-05-29 05:37:30 +00:00
Frank Zago 27c80d116b New email address. 2002-05-29 04:52:14 +00:00
Henning Geinitz cb6aadd8fa Fixed 16 bit pnm output. The byte-order was wrong for little-endian
systems. Based on code from Roland Roberts <roland@astrofoto.org>.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-05-09 13:41:28 +00:00
Henning Geinitz d094d55867 Fixed scanimage SANE_CAP_AUTOMATIC bug (from David Paschal
<paschal@rcsis.com>).
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-04-27 09:40:21 +00:00
Henning Geinitz 84f6c44448 Added missing files to DISTFILES.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-04-24 17:57:23 +00:00
Frank Zago 95c4c5ce82 Missing piece of tstbackend integration. 2002-04-20 22:49:54 +00:00
Frank Zago 1bbfc79ba1 tstbackend integration. 2002-04-19 23:16:16 +00:00
Henning Geinitz 70dde5648d Support for variable DESTDIR. If set, all files are installed to that
location. Also print the filename of the installed file, not only the
path. Both changes are mostly for package creators/maintainers.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-03-29 13:27:16 +00:00
Abel Deuring eee0a46577 frontend/scanimage.c / part for the "-f" command line option:
replaced the vprintf call with a loop of printf calls; fixed
a "too stingy" malloc

Abel
2002-02-16 20:40:19 +00:00
Henning Geinitz 4e2aa9185e Use inet_pton() instead of inet_aton() to avoid compilation errors on e.g.
OS/2.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-02-14 19:36:25 +00:00
Henning Geinitz e3cbda553c Added global list of file patterns for "make distclean". Some "make clean"
and "make distclean" cleanup and additions.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-02-13 20:48:29 +00:00
Henning Geinitz 2e3dc0b7b2 DNS queries for remote hosts are only done if necessary. It's now possible
to use "+" without hosts/DNS entries for the connecting host.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-02-12 22:09:01 +00:00
Abel Deuring c47986a7b3 now commited the updated version of scanimage.c... fetched the wrong version
in my last commit. Thanks to Henning, whgo found this mistake!

Abel
2002-01-25 22:52:52 +00:00
Henning Geinitz cb516b6e38 Added help message for --formatted-device-list. Added va_end() and
#include <stdarg.h>. Used fprintf to print errors. Fixed some typos.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-01-14 20:45:39 +00:00
Abel Deuring 0e65f42ce7 frontend/scanimage.c, doc/scaniamge.man: Added the option -f
--formatted-device-list to allow arbitrarily formatted device
 lists. Suggested by Klaas Freitag.

Abel
2002-01-13 20:46:35 +00:00
Henning Geinitz bfdbda4505 Check that the IP addresses of the peer are the same for control and
data connections. Exit, if this is not the case. Changed some debug
levels.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-01-11 21:02:11 +00:00
Henning Geinitz 445166ec09 Added output of bytes scanned in total. Added warning that's printed if
scanimage gets more data then expected from the parameters.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-01-10 21:27:03 +00:00
Henning Geinitz 514e7a99c6 Removed unnecessary file.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-01-08 23:46:56 +00:00
Henning Geinitz c1b967a5d6 Added target "dist". Fixed .PHONY.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-01-08 19:06:54 +00:00
Henning Geinitz 565aaa0639 Changed access control (function check host). Now IP addresses
are used for comparison, not host names as before. It's possible to
put hostnames, FQDNs and IP addresses into saned.conf.
Limitations: Only the first IP address in struct hostent is checked.
IPv6 is untested. The change is based on a patch by Petter
Reinholdtsen <pere@hungry.com>.
Removed isfdtype to avoid compilation problems. Added more
debug output. Print function name in every DBG statement.
Updated manual pages and saned.conf.
2002-01-06 21:01:05 +00:00
Henning Geinitz 3ce0c90069 Changed debug handling. All debug messages use DBG now. If in inetd mode or dameon mode with "-s",
the messages are printed to syslog as before. If option "-d" is used,
the mesages are printed to stderr. Updated manual page.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-01-05 12:54:34 +00:00
Henning Geinitz aa8f8dbadd Fixed sigpipe race in connection with select_fd. Added debug output.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2001-12-30 21:17:56 +00:00
Henning Geinitz ed63137a3e Fixed endless loop in sighandler.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2001-12-30 21:16:38 +00:00
Peter Kirchgessner 3f2aae2687 Add tiff tag fillorder 2001-12-16 15:19:27 +00:00
Henning Geinitz 0f2483aafa Use out%d.tif by default if --format tiff was selected. Update documentation about default formats.
Fixed spelling mistakes.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2001-11-20 20:23:10 +00:00
Henning Geinitz eec168cdc1 More debug output. Used DBG instead of fprintf/perror.
Fixed some formatting issues.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2001-10-12 19:56:08 +00:00
Henning Geinitz a9218c2311 Fixed minor bugs in debug output and documentation.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2001-08-26 10:39:54 +00:00
Henning Geinitz d6adc10238 Changed order of headers to get test.c compiling on OS/2.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2001-06-04 20:08:22 +00:00
Henning Geinitz 3e72ff5b2f Increase timeout to one hour.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2001-06-04 17:06:39 +00:00