From 3383de3026cd0afb06747069c05a600fd07ec02e Mon Sep 17 00:00:00 2001 From: Mamadou DIOP Date: Tue, 24 May 2016 00:11:39 +0200 Subject: Make ICE dual-satck (IPv46) more versatile --- tinySIP/src/transports/tsip_transport.c | 2 +- tinySIP/src/transports/tsip_transport_layer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tinySIP') diff --git a/tinySIP/src/transports/tsip_transport.c b/tinySIP/src/transports/tsip_transport.c index e9d2473..feec0df 100755 --- a/tinySIP/src/transports/tsip_transport.c +++ b/tinySIP/src/transports/tsip_transport.c @@ -921,8 +921,8 @@ int tsip_transport_init(tsip_transport_t* self, tnet_socket_type_t type, const s } self->stack = stack; - self->type = type; self->net_transport = tnet_transport_create(host, port, type, description); + self->type = tnet_transport_get_type(self->net_transport); // Type could be "ipv46" or any fancy protocol. Update it using the transport master self->scheme = "sip"; diff --git a/tinySIP/src/transports/tsip_transport_layer.c b/tinySIP/src/transports/tsip_transport_layer.c index fc01c0e..562f395 100755 --- a/tinySIP/src/transports/tsip_transport_layer.c +++ b/tinySIP/src/transports/tsip_transport_layer.c @@ -865,7 +865,7 @@ clean_routes: transport = curr; break; } - if((curr->type & destNetType) == destNetType) { + if((curr->type & destNetType) == destNetType || (curr->type & destNetType) == curr->type) { transport_closest1 = curr; } if(self->stack->network.transport_idx_default>= 0 && curr->type == self->stack->network.transport_types[self->stack->network.transport_idx_default]) { -- cgit v1.1