]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip.c: Rework endpt_send_request() req_wrapper code. 87/4387/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:17:33 +0000 (16:17 -0600)
commit412d43fa213fb7677561e0b0f842b56550440d8c
tree1b0accb407e00384358995106140c0a94023e499
parentda68b185b3469361c33b47d93455624aac2e5e5d
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