The ca_repeater function has some failure cases which can cause it to
return. In such a situation, a reference to the current thread's
epicsThreadId is kept in the taskwd, causing an eventual use-after-free
when the taskwd tries to determine the task's status.
We fix this problem by removing the thread from the taskwd if
ca_repeater ever returns.
Added debug messages for client verification.
With -d the repeater shows client events, e.g.
$ caRepeater -d
CA Repeater: Attached and initialized
New client on port 60307
Verified 1 active clients
New client on port 52541
Verified 2 active clients
Client on port 60307 refused message
Deleted client on port 60307
Client on port 52541 refused message
Deleted client on port 52541
^C
Running "caRepeater -dd" also shows beacon forwarding and
individual client verification:
$ caRepeater -dd
CA Repeater: Attached and initialized
New client on port 49968
Client on port 49968 is alive
Verified 1 active clients
Sent to port 49968
Sent to port 49968
Sent to port 49968
New client on port 65377
Sent to port 49968
Client on port 49968 is alive
Client on port 65377 is alive
Verified 2 active clients
Sent to port 49968
Sent to port 65377
Sent to port 49968
Sent to port 65377
Client on port 49968 refused message
Deleted client on port 49968
Sent to port 65377
Sent to port 65377
Client on port 65377 refused message
Deleted client on port 65377
^C
In some cases the license-identification header was missing,
so I added that as well. Replaced the remaining headers that
specifically identified "Versions 3.13.7 and higher".
Makefiles and the build system were deliberately excluded.
Modifications to allow for CA multicast listening by adding multicast address
from EPICS_CA_BEACON_ADDR_LIST (or EPICS_CA_ADDR_LIST if beacon list is empty).
Original modifications from Jim Smedinghoff, with further changes by Pierrick Hanlet.