Commit ce5ce4d9 authored by Youness Alaoui's avatar Youness Alaoui

udp-turn should also handle error responses for send requests and set-active-destination

parent a769e34f
...@@ -267,18 +267,18 @@ nice_udp_turn_socket_parse_recv ( ...@@ -267,18 +267,18 @@ nice_udp_turn_socket_parse_recv (
goto recv; goto recv;
} }
if (stun_message_get_method (&msg) == STUN_SEND) {
if (stun_message_get_class (&msg) == STUN_RESPONSE && if (stun_message_get_class (&msg) == STUN_RESPONSE &&
stun_message_get_method (&msg) == STUN_SEND) { priv->compatibility == NICE_UDP_TURN_SOCKET_COMPATIBILITY_GOOGLE) {
if (priv->compatibility == NICE_UDP_TURN_SOCKET_COMPATIBILITY_GOOGLE) {
uint32_t options = 0; uint32_t options = 0;
if (stun_message_find32 (&msg, STUN_ATTRIBUTE_OPTIONS, &options) == 0 && if (stun_message_find32 (&msg, STUN_ATTRIBUTE_OPTIONS, &options) == 0 &&
options & 0x1) options & 0x1)
goto msn_google_lock; goto msn_google_lock;
} }
return 0; return 0;
} else if (stun_message_get_class (&msg) == STUN_RESPONSE && } else if (stun_message_get_method (&msg) == STUN_OLD_SET_ACTIVE_DST) {
stun_message_get_method (&msg) == STUN_OLD_SET_ACTIVE_DST) { if (stun_message_get_class (&msg) == STUN_RESPONSE &&
if (priv->compatibility == NICE_UDP_TURN_SOCKET_COMPATIBILITY_MSN) priv->compatibility == NICE_UDP_TURN_SOCKET_COMPATIBILITY_MSN)
goto msn_google_lock; goto msn_google_lock;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment