[Nice] Ice test always in NICE_COMPONENT_STATE_FAILED

Youness Alaoui youness.alaoui at collabora.co.uk
Tue Nov 8 09:27:21 PST 2011


Like I told Tiago in my previous email to this mailing list, you cannot hardcode
the candidate list. In your example, you set the remote candidates by forcing
the address of the candidate to whatever you set it to, but you forgot that the
port was not set (and so the port is 0) and it will be a random port number
everytime, so you cannot hardcode it.
Also, I don't like the way you create the list of candidates, you just alloc a
gslist and then set its ->data field. You should use g_slist_append to add
elements to the list.
Also note that the candidate is a lot more than just an ip address, it also has
a priority, a base address, the type is also important (don't just set it to
HOST if it's not an actual host candidate), depending on the compatibility mode,
each candidate may also have their own specific username and password, etc..
You should send the candidate list from one PC to another, just like libnice
gathered them and not try to hardcode it.
That's the reason it keeps failing for you. Do it properly and it shouldn't fail.


On 11/08/2011 11:03 AM, Riccardo Colamatteo wrote:
> Hi to all nicelist members,
> I wrote an attached 2nd little example to test libnice...
> This time I used 2 pc in a little Natted lan...
> When a pc tell me local user & pwd, I write these in other pc...
> I thought this was simple way to test my prog, but I find an error for
> more and more time.
> Please help me... 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/20111108/b15c4abf/attachment.pgp>

More information about the nice mailing list