Commit f974224e authored by Committed by Olivier Crête
agent: fix tcp connection to turn servers
A previous commit broke the logic used to start a discovery request for tcp turn servers. The ambiguity came from the distinction between the type of the turn server (turn->type), the compatibility of the transport of the local base candidate (turn_tcp), and the reliability of the underlying tcp socket (reliable_tcp). reliable_tcp indicates whether the turn allocate request should be "framed" in a tcp packet, according to RFC 4571. This is required in OC2007R2 only. This commit also puts the setup of the tcp turn socket in a separate function, because such setup is also required when handling try-alternate (code 300) stun errors on these tcp sockets, where we have to setup a new connection to another tcp turn server.
Showing with 75 additions and 61 deletions