crashes since the commit ab5d2a5ca (2025-06-17)
That commit started to enforce existence of control socket, which is
not true in case of the reflector.
fixes ab5d2a5ca
closes GH-461
winsock2.h (include from utils/net.h) should be included prior to
windows.h, otherwise windows.h includes winsock.h (version 1), that
is incompatible. WIN32_LEAN_AND_MEAN causes some headers not being
included with windows.h (including winsock.h).
In addition to already existing "mute", that toggled mutte for the
receiver, [un]mute-{sender,receiver} was added, which mutes or unmutes
the sender or receiver.
fixes warnings with Xcode 14.3 as in previous commit
+ allocate +1 in Log_output buffer - snprintf(MULL, 0...) returns number
of bytes without terminating '\0'. std::string storage isn't guaranteed
to be NULL-terminated (std::string("").at(0) throws an exception). The
buffer is somewhere preallocated 256 which prevents problem but it's
better not to rely upon it.
+ comment out some unused function in LDGM that also triggered the
warning but looked a bit suspicious so it was not clear how to fix
Removed msg_change_fec_data, use msg_universal instead.
This is a more versatile solution allowing further extensions without
a need to modify the global structure at an expese of worse type control.
As a replacement, a tag starting msg_universal::text is used/suggested.
Use plain pipe if the TCP compat fails in Linux. This fixes a problem
when there is unavailable loopback connection (eg. running in a separate
network namespace with unassigned loopback address).
src/control_socket.cpp: In function ‘void* control_thread(void*)’:
src/control_socket.cpp:574:44: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1009 [-Wformat-truncation=]
snprintf(buf, sizeof(buf), "(unknown path: %s)", path);
^~~~~~~~~~~~~~~~~~~~ ~~~~
src/control_socket.cpp:574:25: note: ‘snprintf’ output between 17 and 1040 bytes into a destination of size 1024
snprintf(buf, sizeof(buf), "(unknown path: %s)", path);
Use non-blocking socket for network connections since all sockets are
written sequentially. When one gets stuck it blocks the whole stack
(can be a case when a lot of data is produced - eg. statistics).