[Nice] Little buffer problem

Youness Alaoui youness.alaoui at collabora.co.uk
Thu Nov 10 10:41:33 PST 2011


Hi again Riccardo,

First of all, what's a 'mex' ? also, assuming it means a string, I don't
understand what you mean by "an unformatted mex" ?
One thing I noticed in the code is that you do a nice_agent_send and you give it
the strlen+1.. you do know it's meant to send raw data, so you are sending the
string + \x00.. also, when you receive data you print it as a string, but it
could also be raw data, so you should print whatever length it told you it received.
Anyways, I have tried your example, and made it print the length and enabled
debugging, it seems that libnice is sending a STUN request to the STUN server
after the gathering is finished and when it receives the answer, it doesn't
understand it as it seems to be invalid (since STUN server uses an old
incompatible rfc from the STUN used by ICE), so it doesn't handle it and it
sends it to the application.
It looks like a bug, but I'm not sure as I've never seen this before, so it
might be something else wrong with the code you use (but I didn't notice
anything wrong with it). I will need to investigate the issue, but right now I'm
busy, I'll let you know later if I find something.

Youness.

On 11/10/2011 11:10 AM, Riccardo wrote:
> Hi to all members,
> 
> after many attempts, I see libnice at work... uhu! :-)
> 
> Now, I have little problem with buffer: from 1pc I send 1 mex and in
> the other pc I receive correct mex and an other unformatted mex...
> why?? where am I wrong?
> 
> I also hope this simple code may help someone to start libnice studying.
> 
> Thanks to all.
> 
> Bye bye
> Riccardo
> 
> 
> 
> _______________________________________________
> 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: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/nice/attachments/20111110/24da2459/attachment.pgp>


More information about the nice mailing list