Commit 2356cd66 authored by Youness Alaoui's avatar Youness Alaoui

fix 80char limit and remove an implemented TODO

parent 5869965e
...@@ -800,7 +800,7 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer) ...@@ -800,7 +800,7 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
stun_debug ("STUN transaction retransmitted (timeout %dms).\n", stun_debug ("STUN transaction retransmitted (timeout %dms).\n",
timeout); timeout);
/* TODO retransmit */ /* retransmit */
nice_socket_send (cand->nicesock, &cand->server, nice_socket_send (cand->nicesock, &cand->server,
stun_message_length (&cand->stun_message), stun_message_length (&cand->stun_message),
(gchar *)cand->stun_buffer); (gchar *)cand->stun_buffer);
......
...@@ -349,7 +349,8 @@ nice_udp_turn_socket_parse_recv ( ...@@ -349,7 +349,8 @@ nice_udp_turn_socket_parse_recv (
if (valid == STUN_VALIDATION_SUCCESS) { if (valid == STUN_VALIDATION_SUCCESS) {
if (priv->compatibility != NICE_UDP_TURN_SOCKET_COMPATIBILITY_DRAFT9) { if (priv->compatibility != NICE_UDP_TURN_SOCKET_COMPATIBILITY_DRAFT9) {
uint32_t cookie; uint32_t cookie;
if (stun_message_find32 (&msg, STUN_ATTRIBUTE_MAGIC_COOKIE, &cookie) != 0) if (stun_message_find32 (&msg, STUN_ATTRIBUTE_MAGIC_COOKIE,
&cookie) != 0)
goto recv; goto recv;
if (cookie != TURN_MAGIC_COOKIE) if (cookie != TURN_MAGIC_COOKIE)
goto recv; goto recv;
...@@ -358,9 +359,9 @@ nice_udp_turn_socket_parse_recv ( ...@@ -358,9 +359,9 @@ nice_udp_turn_socket_parse_recv (
if (stun_message_get_method (&msg) == STUN_SEND) { if (stun_message_get_method (&msg) == STUN_SEND) {
if (stun_message_get_class (&msg) == STUN_RESPONSE && if (stun_message_get_class (&msg) == STUN_RESPONSE &&
priv->compatibility == NICE_UDP_TURN_SOCKET_COMPATIBILITY_GOOGLE) { priv->compatibility == NICE_UDP_TURN_SOCKET_COMPATIBILITY_GOOGLE) {
uint32_t options = 0; uint32_t opts = 0;
if (stun_message_find32 (&msg, STUN_ATTRIBUTE_OPTIONS, &options) == 0 && if (stun_message_find32 (&msg, STUN_ATTRIBUTE_OPTIONS, &opts) == 0 &&
options & 0x1) opts & 0x1)
goto msn_google_lock; goto msn_google_lock;
} }
return 0; return 0;
...@@ -403,7 +404,9 @@ nice_udp_turn_socket_parse_recv ( ...@@ -403,7 +404,9 @@ nice_udp_turn_socket_parse_recv (
goto recv; goto recv;
} }
data = (uint8_t *) stun_message_find (&msg, STUN_ATTRIBUTE_DATA, &data_len); data = (uint8_t *) stun_message_find (&msg, STUN_ATTRIBUTE_DATA,
&data_len);
if (data == NULL) if (data == NULL)
goto recv; goto recv;
......
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