Wykres commitów

61 Commity (d857f181635059fd6c227f758cffd0707f26ffe5)

Autor SHA1 Wiadomość Data
Mikael Nousiainen d857f18163 Initial implementation of: reader thread for async handling of rig data, UDP multicast publisher routine and rig state poll thread routine. The reader thread can correctly handle asynchronous data, such as transceive or spectrum data. Work in progress: multi-platform code for I/O routines still missing and the poll routine is not yet in use. Tested briefly on an IC-7300 so far. 2021-11-28 20:52:29 +02:00
Mike Black W9MDB 3de368f6a2 Add rig_lock and rig_unlock to support serial I/O locking for a transaction
https://github.com/Hamlib/Hamlib/issues/695
2021-11-15 07:16:31 -06:00
Mike Black W9MDB 41ebbb02b5 Reduce network_open debug to TRACE instead of ERROR 2021-11-07 08:21:54 -06:00
Mike Black W9MDB d18c3a8111 Fix cppcheck warning in network.c 2021-10-24 00:03:48 -05:00
Mike Black W9MDB 6a13d40b9a Reduce scope of var in network.c 2021-09-11 11:24:12 -05:00
Mike Black W9MDB 283281c4cb astyle all files preparing for 4.3 release 2021-08-26 06:49:24 -05:00
Mike Black W9MDB ad43cd793a Fix MULTICAST boolean logic 2021-08-11 23:10:44 -05:00
Mike Black W9MDB 4bfd71f91f Fix Icom split and implement reverse split
These should work now from rigctl and via the API
S VFOB 1 VFOA
S Sub 1 Main
https://github.com/Hamlib/Hamlib/issues/754
2021-08-02 23:37:31 -05:00
Mike Black W9MDB 7d5fa7dc88 Add new xml tag to flrig for identifying the client...will help debugging. 2021-07-21 22:59:53 -05:00
Mike Black W9MDB 8e63ce7a36 Add multicast thread -- the intent is that this will always run
https://github.com/Hamlib/Hamlib/issues/695
2021-05-25 09:29:27 -05:00
Mike Black W9MDB 3e4ff69b96 Add multicast_item_e and change multicast_server API
https://github.com/Hamlib/Hamlib/issues/695
2021-05-23 07:40:08 -05:00
Mike Black W9MDB cc1f277e5f Beginning of multicast capability
https://github.com/Hamlib/Hamlib/issues/695
2021-05-19 13:17:46 -05:00
Mike Black W9MDB ec68495bd3 Change WSAStartup logic in network.c to better allow for errors.
WSAStartup should now get called once only and should be restarted if needed.
https://github.com/Hamlib/Hamlib/issues/679
2021-04-25 08:33:14 -05:00
Michael Black W9MDB a35f39840c Fix gai_error to print the status instead of errno
https://github.com/Hamlib/Hamlib/issues/589
2021-03-07 11:50:13 -06:00
Michael Black W9MDB 307858f60c Add RETURNFUNC/ENTERFUNC to network.c
https://github.com/Hamlib/Hamlib/issues/514
2021-03-07 11:42:01 -06:00
Michael Black W9MDB d8bd6a5d4e Reduce debug level in network.c 2021-02-04 23:47:59 -06:00
Michael Black W9MDB 9db79eb841 Reduce debug level 2021-01-17 08:19:12 -06:00
Michael Black W9MDB 253a3d8643 Fix spelling error 2020-06-22 23:46:27 -05:00
Michael Black W9MDB a88faf29c7 Fix IPV6 addresses with link local
https://github.com/Hamlib/Hamlib/issues/298
2020-06-22 00:00:33 -05:00
Michael Black W9MDB 0f97f33877 Had to mess with _WIN32_WINNT to get inet_pton defined
So we change it to 0x0600 and then back to 0x0502
https://github.com/Hamlib/Hamlib/issues/298
2020-06-21 23:51:02 -05:00
Michael Black W9MDB d27d84c44b Change AI_NUMERICSERV to NI_NUMERICSERV for Windows compatibility 2020-06-21 23:23:55 -05:00
Michael Black W9MDB a3c4eb9ee0 Fix cppcheck warnings 2020-06-21 22:31:31 -05:00
Michael Black W9MDB e092a4a0a4 rigctld -T ::1 now works with rigctl -r ::1
More IPV6 testing needed on Windows and MacOS
Still not binding to link local addresses to be addressed next
https://github.com/Hamlib/Hamlib/issues/29
2020-06-21 17:47:04 -05:00
mdblack98 75d9beaac2 Increase NET_BUFFER_SIZE for network.c 2020-04-22 12:26:08 -05:00
Michael Black f1f0d7f129 Fix some of the documentation 2020-04-09 17:56:19 -05:00
Michael Black ff8ddf018c astyle all C files 2020-02-23 11:26:09 -06:00
Michael Black 297bf9aa6b
Fix cppcheck warnings 2020-01-14 23:36:01 -06:00
Michael Black fb73e5abd7
Fix some cppcheck warnings
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 :-)
2019-12-09 17:12:13 -06:00
Michael Black 6ba8f88e2f
Fix cppcheck warnings in network.c 2019-12-08 17:09:08 -06:00
Michael Black dc3f33bc11
Change %z to %d with casts for portability 2019-11-30 13:05:21 -06:00
Michael Black 6bf3b00c4f
astyle all files 2019-11-30 10:19:08 -06:00
Michael Black 72087f1b10
Change all __FUNCTION__ to __func__ 2019-11-30 10:16:28 -06:00
Michael Black 2f4d62709e
Added a dummy snprintf to rig_debug to allow gcc to check format strings
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
2019-11-30 10:04:31 -06:00
Michael Black 08df457ab2
Restore else clause in network.c -- mistakenly removed 2019-07-31 23:13:35 -05:00
Michael Black 0f404dea20
Remove unneeded debug in network_flush 2019-07-31 12:37:06 -05:00
Michael Black eb9e59211a network.c astyle applied 2019-02-07 11:46:52 -06:00
Michael Black 48c8247a86 Fix network_flush as it was not actually flushing before
This was causing an infinite loop and WSJT-X to lock up using flex6xxx backend
2019-02-07 11:44:33 -06:00
Michael Black 63570dd791 Improve error handling in network_flush when disconnect happens 2019-02-05 09:40:46 -06:00
Nate Bargmann ac540c82cc Quell gcc 8.2.0 warning of possible truncation
On Debian Buster gcc ((Debian 8.2.0-8) 8.2.0) was throwing the following
warning:

  CC       network.lo
../../hamlib/src/network.c: In function ‘network_open’:
../../hamlib/src/network.c:245:46: warning: ‘%s’ directive output may be truncated writing up to 511 bytes into a region of size 139 [-Wformat-truncation=]
         snprintf(msg,sizeof(msg),"connect to %s failed, (trying next interface)",rp->pathname);
                                              ^~
../../hamlib/src/network.c:245:9: note: ‘snprintf’ output between 44 and 555 bytes into a destination of size 150
         snprintf(msg,sizeof(msg),"connect to %s failed, (trying next interface)",rp->pathname);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Raising the size of the msg buffer to 1024 quelled the warning.
2018-10-25 16:58:51 -05:00
Michael Black W9MDB 1e883d0195 Fix compile warnings for src 2018-04-22 18:38:16 -05:00
Michael Black W9MDB 841acdf011 Improve network connect error message 2018-04-14 10:46:13 -05:00
Nate Bargmann ab3e6bb5a5 Formatted src/ to final coding guidelines 2017-10-04 21:32:08 -05:00
Nate Bargmann f76b354588 Reformatted src directory 2017-08-09 06:14:31 -05:00
Jae Stutzman dfd969acd3 Use Windows ioctlsocket to avoid buffer overrun 2017-01-26 19:42:00 -06:00
Jae Stutzman 230430c4e9 Clears potential garbage data in read buffer prior to command being sent 2017-01-25 20:45:24 -06:00
Michael Tatarinov 7848d49a53 Fix typos. 2016-12-18 08:17:54 +04:00
Michael Black 61a0e77110 Fix port->pathname checks
Was always true since it's statically allocated

RRR
Mike W9MDB
2016-02-09 10:59:09 -06:00
Bill Somerville ca7cbd89f4 Fix compiler warnings 2015-11-27 19:17:47 +00:00
Bill Somerville 181a3e9697 Proper IPv6 and dual stack networking
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.
2015-11-27 13:47:48 +00:00
Nate Bargmann b9ff04abf0 Fix W2k 'freeaddrinfo' error
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
2013-05-18 07:31:40 -05:00