]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_rfc3326.c: Fix crash when channel goes away. 25/1625/1
authorRichard Mudgett <rmudgett@digium.com>
Fri, 13 Nov 2015 20:32:10 +0000 (14:32 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 13 Nov 2015 21:31:02 +0000 (15:31 -0600)
commitc0f2f8de458e68e412be91ccc363a9f7aae77c78
tree84a7124b82f04cd2e875d4edbb117b9d64a90c10
parent4f43b85c92050c8deba7041e687404228294d920
res_pjsip_rfc3326.c: Fix crash when channel goes away.

If an authenticated incoming caller does not respond to our 200 OK INVITE
response with an ACK then PJSIP will hangup the call.  Unfortunately,
there is a chance that the session's channel will go away between one use
of the channel pointer and another when building the BYE request because
the BYE is being built by the monitor thread and not the call's serializer
thread.

* Added a check to ensure that the thread trying to add the Reason header
is the call's serializer thread.  This ensures that the channel will not
go away on us.

Change-Id: I866388d2b97ea2032eaae3f3ab3f1ca6cbd2df89
res/res_pjsip_rfc3326.c