[Nice] [PATCH] Make set_remote_candidates return the correct value

Youness Alaoui youness.alaoui at collabora.co.uk
Fri Mar 30 12:37:23 PDT 2012


Yeah, actually, it shouldn't. An error in this case would be an invalid stream
or component id.. that's an error, but not being able to add any should just
return 0.. I think if you want to check for an error, you can check for 'bb-1',
but if you want to check for 'invalid candidates', you can check for 'ret <
num_cands' or '== 0'


On 03/30/2012 03:00 PM, Rohan Garg wrote:
> A follow up remark, the documentation says that it returns -1 on a
> error, depending on whether or not you consider a invalid NiceAddress
> a error, this patch may/may not be relevant.
> 
> Best
> Rohan Garg
> 
> On Sat, Mar 31, 2012 at 12:13 AM, Rohan Garg <rohan16garg at gmail.com> wrote:
>> Hi
>> If I understood the code correctly, in set_remote_candidates if every
>> remote candidate in the list is invalid or when
>> priv_add_remote_candidate returns false for every candidate, 'added'
>> remains as 0 whereas the correct value should be -1 since no
>> candidates were added for connchecks. I've added a patch that fixes
>> this issue.
>>
>> Best
>> Rohan Garg
> _______________________________________________
> 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/20120330/2724243d/attachment.pgp>


More information about the nice mailing list