-
- Downloads
res_pjsip contact: Lock expiration/addition of contacts
Contact expiration can occur in several places: res_pjsip_registrar, res_pjsip_registrar_expire, and automatically when anyone calls ast_sip_location_retrieve_aor_contact. At the same time, res_pjsip_registrar may also be attempting to renew or add a contact. Since none of this was locked it was possible for one thread to be renewing a contact and another thread to expire it immediately because it was working off of stale data. This was the casue of intermittent registration/inbound/nominal/multiple_contacts test failures. Now, the new named lock functionality is used to lock the aor during contact expire and add operations and res_pjsip_registrar_expire now checks the expiration with the lock held before deleting the contact. ASTERISK-25885 #close Reported-by: Josh Colp Change-Id: I83d413c46a47796f3ab052ca3b349f21cca47059
Showing
- include/asterisk/res_pjsip.h 43 additions, 0 deletionsinclude/asterisk/res_pjsip.h
- res/res_pjsip/location.c 42 additions, 2 deletionsres/res_pjsip/location.c
- res/res_pjsip_registrar.c 41 additions, 14 deletionsres/res_pjsip_registrar.c
- res/res_pjsip_registrar_expire.c 17 additions, 1 deletionres/res_pjsip_registrar_expire.c
Loading
Please register or sign in to comment