Commit 7847dc9f authored by Olivier Crête's avatar Olivier Crête

udp-turn-over-tcp: Add short-term auth there too

parent 9cadbc69
......@@ -144,6 +144,7 @@ socket_recv_message (NiceSocket *sock, NiceInputMessage *recv_message)
if (priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_DRAFT9 ||
priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_RFC5766 ||
priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_RFC5766_SHORT_TERM ||
priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_OC2007)
headerlen = 4;
else if (priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_GOOGLE)
......@@ -168,7 +169,8 @@ socket_recv_message (NiceSocket *sock, NiceInputMessage *recv_message)
return 0;
if (priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_DRAFT9 ||
priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_RFC5766) {
priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_RFC5766 ||
priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_RFC5766_SHORT_TERM){
guint16 magic = ntohs (*priv->recv_buf.u16);
guint16 packetlen = ntohs (*(priv->recv_buf.u16 + 1));
......@@ -203,7 +205,8 @@ socket_recv_message (NiceSocket *sock, NiceInputMessage *recv_message)
}
if (priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_DRAFT9 ||
priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_RFC5766)
priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_RFC5766 ||
priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_RFC5766_SHORT_TERM)
padlen = (priv->expecting_len % 4) ? 4 - (priv->expecting_len % 4) : 0;
else
padlen = 0;
......@@ -310,7 +313,8 @@ socket_send_message (NiceSocket *sock, const NiceAddress *to,
local_bufs[0].size = sizeof (guint16);
offset = 1;
} else if (priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_DRAFT9 ||
priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_RFC5766) {
priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_RFC5766 ||
priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_RFC5766_SHORT_TERM) {
gsize message_len = output_message_get_size (message);
gsize padlen = (message_len % 4) ? 4 - (message_len % 4) : 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