diff options
author | System Administrator <root@Mamadous-MacBook-Pro.local> | 2016-05-24 04:55:24 +0200 |
---|---|---|
committer | System Administrator <root@Mamadous-MacBook-Pro.local> | 2016-05-24 04:55:24 +0200 |
commit | 597432ee264452540be1e67120e0ce41f6c02f28 (patch) | |
tree | 471fe56c0b211ecfde7bf6824357f99d2093d712 /tinyRTP | |
parent | 8ea9eca8a63ffda118af1bfafaadb9fdcda8f8b0 (diff) | |
download | doubango-597432ee264452540be1e67120e0ce41f6c02f28.zip doubango-597432ee264452540be1e67120e0ce41f6c02f28.tar.gz |
Set default RTP socket to IPv4 or IPv6 instead of invalid depending on use_ipv6 flag
Diffstat (limited to 'tinyRTP')
-rwxr-xr-x | tinyRTP/src/trtp_manager.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tinyRTP/src/trtp_manager.c b/tinyRTP/src/trtp_manager.c index d1fcff1..3f7778e 100755 --- a/tinyRTP/src/trtp_manager.c +++ b/tinyRTP/src/trtp_manager.c @@ -940,11 +940,11 @@ int trtp_manager_prepare(trtp_manager_t* self) #define __retry_count_max 5 #define __retry_count_max_minus1 (__retry_count_max - 1) uint8_t retry_count = __retry_count_max; - tnet_socket_type_t socket_type = tnet_socket_type_invalid; + tnet_socket_type_t socket_type = self->use_ipv6 ? tnet_socket_type_udp_ipv6 : tnet_socket_type_udp_ipv4; // If local IP is defined then check its address family if (!tsk_strempty(self->local_ip)) { - socket_type = tnet_get_type(self->local_ip, rtp_local_port); // IP @ always returns IPv4Only or IPv6Only + socket_type = tnet_get_type(self->local_ip, rtp_local_port); // IP address always returns IPv4Only or IPv6Only } /* Creates local rtp and rtcp sockets */ |