mirror of https://github.com/sipwise/rtpengine.git
When binding the port to a socket, init fd to -1
because 0 is actually a valid id for fd in the system,
this `struct socket_port_link spl = {0};` puts `.fd = 0`
and if socket binding fails, then `.fd == 0` which is
a totally valid fd.
Instead init it to -1 and then let `add_socket()` to
actually fill the structure's data properly,
if however that one fails to bind, then again return
`.fd = -1`.
Change-Id: Iaeeee534a66b43441253ddfe710c8163084ad444
master
parent
294b8140f1
commit
2bd4f4d311
Loading…
Reference in new issue