]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip.c: Rework endpt_send_request() req_wrapper code. 88/4388/1
authorRichard Mudgett <rmudgett@digium.com>
Fri, 23 Sep 2016 22:54:07 +0000 (17:54 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 10 Nov 2016 22:19:11 +0000 (17:19 -0500)
commitd36695e0bbf0f8dd70bfe139a10f8de59f3d56c3
treea9afc9d64a8784451ec3dab0a11a2afe81ab3811
parent49dd63704715f4413b40ee97f33b0a78bee803ef
res_pjsip.c: Rework endpt_send_request() req_wrapper code.

* Don't hold the req_wrapper lock too long in endpt_send_request().  We
could block the PJSIP monitor thread if the timeout timer expires.
sip_get_tpselector_from_endpoint() does a sorcery access that could take
awhile accessing a database.  pjsip_endpt_send_request() might take awhile
if selecting a transport.

* Shorten the time that the req_wrapper lock is held in the callback
functions.

* Simplify endpt_send_request() req_wrapper->timeout code.

* Removed some redundant req_wrapper->timeout_timer->id assignments.

Change-Id: I3195e3a8e0207bb8e7f49060ad2742cf21a6e4c9
res/res_pjsip.c