Commit a373cc63 authored by Dafydd Harries's avatar Dafydd Harries

don't try to decode packets as STUN unless top two bits are 0

darcs-hash:20070125150352-c9803-c9c056163f4b13de2ae3756fd0e4e7d06328e7e7.gz
parent 791932e3
......@@ -430,6 +430,10 @@ ice_agent_recv (
* active.
*/
/* The top two bits of an RTP message are the version number; the current
* version number is 2. The top two bits of a STUN message are always 0.
*/
if ((buf[0] & 0xc0) == 0x80)
{
/* looks like RTP */
......@@ -445,7 +449,7 @@ ice_agent_recv (
g_assert (stream->handle_recv != NULL);
stream->handle_recv (agent, candidate->stream_id, len, buf);
}
else
else if ((buf[0] & 0xc0) == 0)
{
StunMessage *msg;
......
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