summaryrefslogtreecommitdiffstats
path: root/tinyRTP
diff options
context:
space:
mode:
authorSystem Administrator <root@Mamadous-MacBook-Pro.local>2016-05-24 04:55:24 +0200
committerSystem Administrator <root@Mamadous-MacBook-Pro.local>2016-05-24 04:55:24 +0200
commit597432ee264452540be1e67120e0ce41f6c02f28 (patch)
tree471fe56c0b211ecfde7bf6824357f99d2093d712 /tinyRTP
parent8ea9eca8a63ffda118af1bfafaadb9fdcda8f8b0 (diff)
downloaddoubango-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-xtinyRTP/src/trtp_manager.c4
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 */
OpenPOWER on IntegriCloud