mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-11 15:18:38 +00:00
Merge "res/res_pjsip: Fix off nominal crash with requests that fail and have a timer" into 13
This commit is contained in:
@@ -3155,10 +3155,12 @@ static pj_status_t endpt_send_request(struct ast_sip_endpoint *endpoint,
|
|||||||
char errmsg[PJ_ERR_MSG_SIZE];
|
char errmsg[PJ_ERR_MSG_SIZE];
|
||||||
|
|
||||||
if (timeout > 0) {
|
if (timeout > 0) {
|
||||||
pj_timer_heap_cancel_if_active(pjsip_endpt_get_timer_heap(endpt),
|
int timers_cancelled = pj_timer_heap_cancel_if_active(pjsip_endpt_get_timer_heap(endpt),
|
||||||
req_wrapper->timeout_timer, TIMER_INACTIVE);
|
req_wrapper->timeout_timer, TIMER_INACTIVE);
|
||||||
|
if (timers_cancelled > 0) {
|
||||||
ao2_ref(req_wrapper, -1);
|
ao2_ref(req_wrapper, -1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Complain of failure to send the request. */
|
/* Complain of failure to send the request. */
|
||||||
pj_strerror(ret_val, errmsg, sizeof(errmsg));
|
pj_strerror(ret_val, errmsg, sizeof(errmsg));
|
||||||
|
Reference in New Issue
Block a user