summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-06-20 12:29:13 -0300
committerJoshua Colp <jcolp@digium.com>2016-06-20 16:21:49 -0300
commitba0d9e7f7af620e27ce3b09062c28a7f8fcc4557 (patch)
treef4c948aef6c50a9c67beaf9c41e46fe7d01ed2dd /include
parent4d52b4c3e5fd726ee4006a1dcca082e778deb9a7 (diff)
res_pjsip_session: Handle race condition at shutdown with timer.
When shutting down res_pjsip_session will get unloaded before res_pjsip. The act of unloading unregisters all the PJSIP services and sets their module IDs to -1. In some cases it is possible for a timer to occur after this happens which calls into res_pjsip_session. The res_pjsip_session module can then try to get the session from the INVITE session using the module ID. Since the module ID is now -1 this fails. This change stores a copy of the module ID and uses it for the timer callback scenario. If the module ID is -1 the callback immediately returns but if the module ID is valid then it continues as normal. This works as the original ID of the module is guaranteed to still be valid when used with the INVITE session. ASTERISK-26127 #close Change-Id: I88df72525c4e9ef9f19c13aedddd3ac4a335c573
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions