Ralph Little
31a09f5500
various: convert pre-ANSI declarations to ANSI
...
Newer clang deprecates the pre-ANSI way to declare functions with no args.
This breaks recent Fedora CI images.
2024-09-05 22:17:27 -07:00
Ralph Little
22e3de3642
net: fix trailing whitespace from previous merge.
2023-12-31 18:46:24 -08:00
Jonathan Schulz
8a57a6934f
Refactor deprecated getlogin()
2023-12-31 21:35:26 +00:00
David Ward
1a933bba7e
Cast pointer arguments if needed when using "%p" format specifier
...
Pointer arguments must have type (void *) when printed with the format
specifier "%p".
2022-03-08 19:00:00 -05:00
David Ward
f3162bafa8
Replace variable self-assignments to avoid Clang warnings
...
These were intended to suppress GCC warnings about unused variables.
However, this leads to different warnings from Clang instead.
Use another approach that suppresses warnings from both compilers.
2022-03-08 19:00:00 -05:00
David Ward
6be83f469b
Resolve compiler warnings about misleading indentation
...
This change is targeted at specific lines of code reported by GCC or
Clang as potentially causing unintended behavior.
2022-03-08 19:00:00 -05:00
Olaf Meeuwissen
e79adde8b2
Use URL to refer users to copies of the GPL and LGPL
...
With the exception of use in three quotes as well as our inlcuded copy
of the GPL, all use of the Free Software Foundation's postal address
has been removed.
Re #320 .
2021-02-12 17:41:38 +09:00
Peter Marschall
e0bc8e9ba7
spelling fixes for net backend
2020-08-29 09:18:04 +02:00
Olaf Meeuwissen
53875a5238
Fix WITH_AVAHI preprocessor conditionals
...
The macro is now always defined to either 0 or 1.
2020-03-14 15:46:03 +09:00
Olaf Meeuwissen
23891a2646
.editorconfig: trim trailing whitespace
2017-05-29 21:14:29 +09:00
Christopher James Halse Rogers
77dcf26860
Fix potential assert in avahi backend
...
avahi_browser contains a reference to an AvahiClient, which may be
avahi_client. If it does, then freeing avahi_browser references avahi_client,
resulting in an assert() in Avahi's linked list macro.
Fix this by freeing avahi_browser before avahi_client.
See https://bugs.launchpad.net/bugs/831867
2017-05-13 13:07:01 +09:00
Olaf Meeuwissen
219a877858
net: Add mutex lock logic around device additions
...
The avahi_thread may call add_device() as well. This addresses a
concern raised in 313921 and may fix 314696 as well as 315044.
2015-09-28 21:16:07 -04:00
Yuri Chornoivan
648d933c56
Fix minor typos in messages and comments
2015-08-31 20:31:54 -04:00
Julien BLACHE
31005330f0
net: fix sane_init() DBG() call wrt function pointer cast to void *
2010-06-23 18:21:33 +02:00
Mattias Ellert
aaa18be7e3
Add missing includes
2009-06-21 09:12:09 +02:00
Chris Bagwell
70f3fdfba4
* acinclude.m4, backend/*.[ch], tools/*.[ch], frontend/*.[ch]:
...
Global replace of u_int??_t with C9x standard based uintxx_t
in order to remove some tricky and overlapping portability logic
from acinclude.m4 and leave it in only m4/stdint.m4.
2009-02-26 03:15:43 +00:00
Julien BLACHE
042656a002
Raise avahi-client dependency to 0.6.24.
2009-02-18 13:25:44 +00:00
Julien BLACHE
6733db0ec1
Do not lock the Avahi thread before stopping it. Leads to a deadlock,
...
so it seems it's actually not necessary anymore.
2009-02-18 11:07:38 +00:00
Julien BLACHE
07b79c5feb
Fix typo in message.
2008-08-04 20:50:34 +00:00
Julien BLACHE
154bea9618
sane_control_option(): perform options reload if asked by the remote backend and the frontend doesn't care (info == NULL)
2008-07-20 10:28:14 +00:00
Julien BLACHE
29e8be57e5
Fetch option descriptors in sane_open() so a GET_VALUE on option 0 can still
...
work without having to get option descriptor 0 beforehand.
2008-06-24 20:07:01 +00:00
Julien BLACHE
f7f53e0479
Do not refresh option descriptors cache behind the frontend's back.
2008-06-24 17:29:37 +00:00
Julien BLACHE
e4d87cce65
Lock the Avahi thread before stopping it and tearing down the Avahi objects.
2008-06-06 15:24:28 +00:00
Julien BLACHE
57bfede65b
Plug an information leak in the net backend.
...
When sending out a SANE_NET_CONTROL_OPTION RPC for the SANE_ACTION_GET_VALUE
action (and SANE_ACTION_SET_AUTO for the network protocol versions < 3), the
backend was not clearing the memory area for the value argument before
sending it over the network, resulting in an information leak for the
SANE_ACTION_GET_VALUE case.
2008-04-13 14:44:20 +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
7a90266998
Fix legacy IPv4 code.
2007-10-27 09:07:28 +00:00
Julien BLACHE
4cf4d8dd7f
Add an optional connection timeout option for the net backend. This can be used to prevent the backend from hanging for several minutes when the saned server is unresponsive.
2007-10-24 10:32:46 +00:00
Henning Geinitz
af58065746
64 bit platform fixes (bug #300799 ).
2004-10-03 17:34:36 +00:00
Henning Geinitz
a70f09e4ca
Check for (size_t) -1 doesn't work on 64 bit platforms as size_t is 64 bits
...
there while the length of a data block is defined as 32 bits in the SANE network
standard (bug #300837 ).
2004-10-03 12:34:10 +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
e7484c515e
Silenced some compilation warnings.
2003-12-27 17:48:39 +00:00
Henning Geinitz
0ade0d195a
Fixed bug concerning hosts that have both IPv6 and IPv4 addresses but only
...
accept connections on IPv4. Patch from Julien BLACHE <jb@jblache.org>.
2003-05-30 18:09:25 +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
Henning Geinitz
b0d7681738
Initialize global variables in sane_init to avoid segmentation faults when
...
sane_init/sane_exit is run more than once.
2003-02-22 15:37:19 +00:00
Henning Geinitz
991bd09675
Fixed PACKAGE_VERSION breakage. PACKAGE_VERSION was redefined by autoconf 2.5
...
with a different meaning. Use PACKAGE_STRING instead.
2002-11-29 18:19:58 +00:00
Henning Geinitz
d4a383d233
Fixed bug in sane_read that cause garbled data to be sent to the
...
frontend. Fixed some long lines.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-04-18 19:55:08 +00:00
Henning Geinitz
ee7b0e32f8
Fixed 16-bit byte-order handling in sane_read() (patch from Michael Herder
...
<crapsite@gmx.net>). New version: 1.0.7.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-03-24 21:51:04 +00:00
Henning Geinitz
3645fddf18
Use copies of option descriptors to make sure their addresses aren't changed
...
until sane_close. New version: 1.0.7.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-03-20 21:49:54 +00:00
Henning Geinitz
644a271538
Fixed some DBG format warnings.
...
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-02-14 19:50:10 +00:00
Henning Geinitz
f330f0d15c
Return SANE_STATUS_ACCESS_DENIED if access was not granted
...
instead of SANE_STATUS_IO_ERROR.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-01-06 21:04:43 +00:00
Henning Geinitz
755902d1cd
Fixed race condition between saned sending NET_OPEN reply
...
and net.c flushing the wire. New version: 1.0.6.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-01-05 11:35:22 +00:00
Henning Geinitz
fe5ce9118f
Better and more debug output (based on patch from Jochen Eisinger <jochen.eisinger@gmx.de>).
...
Fixed some debug output and formatting issues of the byte order patch. Increased version number
to 1.0.5.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2001-10-12 18:39:31 +00:00
Henning Geinitz
ea70547e9b
Fixed byte order problems for 16 bits per color image data (from mh <crapsite@gmx.net>).
...
Henning Meier-Geinitz <henning@meier-geinitz.de>
2001-10-09 19:41:14 +00:00
Jochen Eisinger
e73c822a4d
2001-09-05 Jochen Eisinger <jochen.eisinger@gmx.de>
...
* backend/net.c: ignoring size of parameter value for
SANE_ACTION_SET_AUTO (as described in the SANE standard)
2001-09-05 18:03:12 +00:00
Henning Geinitz
d90edc34e2
Fixed yet another segfault. Added debug messages.
...
Henning Meier-Geinitz <henning@meier-geinitz.de>
2001-06-03 14:57:00 +00:00
Henning Geinitz
8e819c331b
Fixed some memory leaks. A bit of reformating. Added more
...
debug output. Used #include "../include/sane/...".
Henning Meier-Geinitz <henning@meier-geinitz.de>
2001-05-13 16:23:48 +00:00
Henning Geinitz
5bb971f671
Free devlist in sane_exit. Use "../include/sane/...".
2001-05-06 19:08:13 +00:00
Henning Geinitz
ffa8983698
Removed access to uninitialized memory. Changed htons to ntohs
...
in DBG statement. Increased version number.
2001-05-06 09:16:13 +00:00
Petter Reinholdtsen
165e106361
Make sure net backend release all memory when finished.
2001-04-29 11:11:07 +00:00