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

Matt Jordan reviewboard at asterisk.org
Tue Dec 23 10:50:27 CST 2014


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



branches/13/res/res_pjsip/pjsip_options.c
<https://reviewboard.asterisk.org/r/4289/#comment24558>

    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.



branches/13/res/res_pjsip/pjsip_options.c
<https://reviewboard.asterisk.org/r/4289/#comment24557>

    Blob


- Matt Jordan


On Dec. 23, 2014, 10: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, 10: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/3283772d/attachment.html>


More information about the asterisk-dev mailing list