On behave of MOXA, we like to report a bug in TCNOpen:
In trdp_requestSocket(), UDP socket is first opened by vos_sockOpenUDP(), followed with some socket setup including join multicast group and bind.
If these steps went wrong, trdp_requestSocket() returns error without releasing opened socket.
This makes application impossible to re-initialize the UDP socket, for trdp_requestSocket() will always return previouse socket which is not correctly created.
We also found that the usage count in trdp_requestSocket() seems to be assigned with incorrect value, so we fixed it along with the major issue.
The attachment is our propose patch, please let me know if we handled it correctly, thanks!
Thanks, I took it as proposed...