Closed xhaakon closed 10 years ago
Thank you Jakub, that was a good catch. The g_socket_bind was necessary to make sure the TCP connection comes from the correct interface in a multi-homed PC. The only thing I changed was set the port to 0 before sending the local_address to tcp_bsd_socket_new.
When I try the latest dev branch of libnice with Pidgin on a machine with multiple host IPs, I get similar list of candidates:
Note the repeating relay candidates with foundations 19 and 20.
I guess it's because all relay candidates are given the same base address obtained by g_socket_get_local_address() in nice_tcp_bsd_socket_new(). Please tell me what do you think about my attempt to fix this problem in tcp-bsd-local-address branch, where each relay candidate gets an IP of its respective host candidate as a base address.
Feel free to adapt the patches (maybe the g_socket_bind() call is not necessary). First commit is just my additional debug message and can be ignored.