]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip.c: Rework endpt_send_request() req_wrapper code. 89/4389/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:23 +0000 (17:19 -0500)
commit338f35edccb2043f7ed07f671e9eab5875966a7b
tree2fb43c10b6e0f845dccd0e5a381886ba2e078127
parent9df59d9ff41afdc732a2f8e91783c1e329b933fc
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