[Nice] STUN demux error: no cookie!

Youness Alaoui youness.alaoui at collabora.co.uk
Sat Jan 22 21:28:31 PST 2011


Hi,

Haven't looked at it much (it's 12:30 AM, and I just got home), just quickly 
browsed the code, the issue I can see is that you're calling 
nice_agent_attach_recv in the candidate_gathering_done, but you actually need to 
attach the recv callback for the gathering to work.
The 'attach_recv' is there to make it add a watch on a socket, without it, it 
will never receive anything, so it can't process the stun response.
You should do it in the main, before calling gather_candidates.
Also, about the 'no cookie' error, I'm not sure if it really matters, it's 
probably just the stun server checking whether the client is using the RFC 5389 
or RFC 3489. it errors on 5389 since it can't find the cookie, so it falls back 
on the 3489 compatibility mode. I'm not 100% sure, if my above suggestion 
doesn't fix it, then we can look further into why it showed that error.

Hope it helps.
Youness.

On 01/21/2011 06:52 PM, Dawid Ciepliński wrote:
> Hello, All
>
> I'm trying to make the example code
> (http://nice.freedesktop.org/libnice/NiceAgent.html) contact stund.
> Unfortunately, I keep getting
>
> `STUN demux error: no cookie!'
>
> error. I'm using libnice-0.1.0, the source code and output is attached.
> Could you please tell me what I'm doing wrong here?
>
> Thank you in advance.
>
>
> Best regards,
>
>
>
>
> _______________________________________________
> Nice mailing list
> Nice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nice



More information about the Nice mailing list