[asterisk-dev] [Code Review] 4289: pjsip_options: Fix duplicate qualify schedules on reload.

George Joseph reviewboard at asterisk.org
Tue Dec 23 10:58:14 CST 2014



> On Dec. 23, 2014, 9:50 a.m., Matt Jordan wrote:
> > branches/13/res/res_pjsip/pjsip_options.c, lines 962-966
> > <https://reviewboard.asterisk.org/r/4289/diff/2/?file=70010#file70010line962>
> >
> >     Is this still needed with the patch from https://reviewboard.asterisk.org/r/4290/?
> >     
> >     In r4290, you remove all scheduled qualifies in qualify_and_schedule_all. Here, we have:
> >     
> >     * qualify_and_schedule_all calls qualify_and_schedule_all_cb
> >     * qualify_and_schedule_all_cb calls qualify_and_schedule_cb
> >     * With this patch, qualify_and_schedule_cb explicitly removes the scheduled qualify for the contact
> >     
> >     However, if we already purged all of the scheduled qualifies, we don't need to do it again here.
> >     
> >     Note that this is the only call chain for these functions, so there is not another code path that would need the explicit unschedule_qualify.

I was just being safe in case someone in the future used this callback for an individual contact.


- George


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4289/#review14039
-----------------------------------------------------------


On Dec. 23, 2014, 9:09 a.m., George Joseph wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4289/
> -----------------------------------------------------------
> 
> (Updated Dec. 23, 2014, 9:09 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Every time you do a core reload, all qualifyable contacts are scheduled again without removing the existing schedule.  So, if you've reloaded 10 times, all contacts will be qualified 11 times in the specified time interval.
> 
> This patch just adds an unschedule_qualify before adding the new one.
> 
> NB: If a contact unregisters, it was already being cleaned up correctly but if a reload is done and an endpoint/aor is deleted, the contact continues to qualify.  Separate patch coming for that.
> 
> 
> Diffs
> -----
> 
>   branches/13/res/res_pjsip/pjsip_options.c 430058 
> 
> Diff: https://reviewboard.asterisk.org/r/4289/diff/
> 
> 
> Testing
> -------
> 
> Verified with Wireshark that the correct number of OPTIONS messages are being sent after a reload.
> 
> 
> Thanks,
> 
> George Joseph
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141223/b8ffc2a9/attachment.html>


More information about the asterisk-dev mailing list