]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_registrar_expire: Fix race condition at shutdown. 44/2544/3
authorJoshua Colp <jcolp@digium.com>
Thu, 7 Apr 2016 16:05:26 +0000 (13:05 -0300)
committerJoshua Colp <jcolp@digium.com>
Thu, 7 Apr 2016 16:42:32 +0000 (11:42 -0500)
commit2eaeea690d14a2c9b8eb962a021a957abdb4444d
treed6706c0d2fcc2a6ba7389ab7eb0e18521e30a18a
parent3e5672d843de69761e151238111a9a49e0064b4b
res_pjsip_registrar_expire: Fix race condition at shutdown.

When shutting down, the PJSIP sorcery is destroyed. The registrar
expiration module queries the PJSIP sorcery to determine what
to expire. As there was no synchronization between termination
of the expiration thread and the unloading of the module it was
possible for the thread to try to access the PJSIP sorcery after
it had been destroyed.

This change ensures that the thread is shut down before allowing
the module to be considered unloaded.

Change-Id: I69fd239edbaaf160c2d37ae00d3ac06e5596fe8b
res/res_pjsip_registrar_expire.c