Fix TCP TURN for Google compatibility. Message length was sent uninitialized
authorYouness Alaoui <youness.alaoui@collabora.co.uk>
Fri, 4 Apr 2014 06:43:20 +0000 (02:43 -0400)
committerOlivier CrĂȘte <olivier.crete@collabora.com>
Fri, 4 Apr 2014 22:34:17 +0000 (18:34 -0400)
socket/tcp-turn.c

index aae2ef0..c83372f 100644 (file)
@@ -253,6 +253,7 @@ socket_send_message (NiceSocket *sock, const NiceAddress *to,
   local_message.n_buffers = n_bufs + 1;
 
   if (priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_GOOGLE) {
+    header_buf = htons (output_message_get_size (message));
     local_bufs[0].buffer = &header_buf;
     local_bufs[0].size = sizeof (header_buf);
     offset = 1;