[Nice] can't get srflx addresses from STUN

Youness Alaoui youness.alaoui at collabora.co.uk
Mon Jan 28 18:00:36 PST 2013


Thanks for attaching your source, after a quick look, I found the issue (I
expected it). You are missing the call to nice_agent_attach_recv :

If you don't call the API, then the NiceAgent won't listen to the socket (since
it doesn't know yet which mainloop/thread to attach its callback to).
Once you do that, it will receive the STUN response and should handle it.
As for the debug messages, I think if you're using a recent enough version of
glib, you would also need to 'export G_MESSAGES_DEBUG=all' otherwise the
messages from g_debug are not printed.

I hope this helps,

On 01/28/2013 06:34 PM, Bryce Allen wrote:
> I'm having trouble getting libnice to recognize STUN binding responses
> and add a server reflexive candidate. I confirmed with wireshark that
> the response is received and looks valid. Attached is my test program,
> any help would be greatly appreciated. I'm using libnice 0.1.2, packaged
> for debian sid (which looks like it's unpatched from the original).
> NICE_DEBUG=all ./nicetest $(host stun.stunprotocol.org | awk '{ print
> $4 }')
> Using stun server ''
> waiting for signal
> STUN transaction retransmitted (timeout 398ms).
> STUN transaction retransmitted (timeout 797ms).
> STUN transaction retransmitted (timeout 1593ms).
> got gathering done signal, quitting mainloop
> got signal
> foundation: 1, addr:, base:, type: host
> thread_mainloop exit
> I see a lot more debug messages in the library source, I don't know why
> I'm only seeing the stun retransmit with NICE_DEBUG=all.
> Thanks,
> Bryce
> _______________________________________________
> nice mailing list
> nice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nice

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/nice/attachments/20130128/dd66c11e/attachment.pgp>

More information about the nice mailing list