Fix declarations after statements
Remove some !rig checks...we either don't need them or need them everywhere with a new error code
If you pass a NULL rig you get what you deserve :-)
This found tons of errors in rig_debug statements
So this patch cleans up all the files that were producing warnings or errors
This should fix a few segfaults when running with debug turned on
Because some rigs lock their front panel when opened for CAT it is
helpful to call rig_close() in rigctld when no clients are
connected. This change does that.
A CTRL+C handler is also added to allow rig_close() to be called
during exit.
Separate FT-891 features
Fix rigctl and rigctld to not abort on function not available
Change Yaesu detection of FA length to automatic method instead of rig specific
Although there is no reasonable recovery from SIGPIPE we do not want
to terminate the server process, just the client servicing thread. We
do this by setting the disposition for SIGPIPE to ignored, this causes
an EPIPE to be returned from blocked write() and send() calls that end
up trying to send to a broken pipe/socket.
After discussions with Greg N1DAM I have changed the dual stack
support to explicitly allow IPv4 connections mapped to IPv6 for any
AF_INET6 address since BSD as well as Windows defaults this socket
option to on (disallowed).
IPv4 mapped to IPv6 makes sense for Hamlib servers since starting two
servers one for each protocol family (the other option) is not
possible since there is only a single rig/rotator which cannot be
shared between two servers.
This means that rigctl & rigctld now work with default arguments on a
modern Windows machine with dual stack and localhost being [::1] as
the first interface returned by getaddrinfo().
Try all the interfaces return by DNS lookups to establish a connection
or listening port. Handle Windows network errors correctly so that
meaningful messages are printed.
The rigctl program now accepts IPv6 numeric addresses in the portname
field like [<addr>}:<port> for example the IPv6 loopback on port 4531
would be [::1]:4531.
Use the system gettaddrinfo function when possible as before. Tested on
GNU, Cygwin, MinGW on Linux, and MinGW on Windows. Under MinGW the
replacement getaddrinfo is used. Perhaps this is an area for
investigation to be certain MinGW really doesn't supply getaddrinfo.
This reverts some of the patches from Remi Chateauneu in commit
60019c9. This fixes build issues encountered building the Windows
binary daily snapshots.
Enabled static library build by default at configure time.
Fixed pthread library linking for the ars backend on MinGW.
Trying to run the pthread enabled binaries on W2k resulted in an error
dialog with the text, "The procedure entry point freeaddrinfo could not be
located in ws2_32.dll". A Microsoft support page
(http://support.microsoft.com/kb/955045) hints that when 'ws2tcpip.h' is
included that 'wspiapi.h' should be included as well. Since MinGw
includes both files, this patch corrects the runtime error on W2k
The -r, -p , and -d options could result in a port pathname that is
not a NULL terminated string as the allowed string length is the same
size as the buffer per the strncpy manual page. This is corrected by
assuring that the allowed length is FILPATHLEN - 1.
Sockets under Windows require specific startup and cleanup calls.
Besides, the standard fdopen() does no work on socket descriptors,
and has to be worked around thanks to _open_osfhandle().
clients to query the state of the -b|--block or -o|--vfo options from rigctld
Cleaned up strings in dumpcaps.c to remove duplicates to facilite
their use as key:value pairs
Updated rigctld man page for new commands
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2820 7ae35d74-ebe9-4afe-98af-79ac388436b8