From: Andrey Volk Date: Thu, 16 Apr 2020 00:17:16 +0000 (+0400) Subject: [sofia-sip] Fix crash in timer B outgoing_timer_bf() which asserts if INVITE request... X-Git-Tag: v1.10.3^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84a20addc88f9cc6bdcf242a7b5a349af85edc3c;p=thirdparty%2Ffreeswitch.git [sofia-sip] Fix crash in timer B outgoing_timer_bf() which asserts if INVITE request was completed already. --- diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index 4fe074aa97..70251da952 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Wed Apr 1 12:53:24 MDT 2020 +Thu Apr 16 17:42:40 UTC 2020 diff --git a/libs/sofia-sip/libsofia-sip-ua/nta/nta.c b/libs/sofia-sip/libsofia-sip-ua/nta/nta.c index ca67cc032f..07bab4f6eb 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nta/nta.c +++ b/libs/sofia-sip/libsofia-sip-ua/nta/nta.c @@ -8965,8 +8965,17 @@ void outgoing_trying(nta_outgoing_t *orq) { if (orq->orq_forked) ; - else if (orq->orq_method == sip_method_invite) - outgoing_queue(orq->orq_agent->sa_out.inv_calling, orq); + else if (orq->orq_method == sip_method_invite) { + if (!orq->orq_completed) { + outgoing_queue(orq->orq_agent->sa_out.inv_calling, orq); + } else { + SU_DEBUG_5(("nta(%p): completed request can not be put into inv_calling queue (%u)\n", (void *)orq, orq->orq_cseq->cs_seq)); + if (orq->orq_queue != orq->orq_agent->sa_out.inv_completed) { + /* Put back into inv_completed if it's not there by any reason */ + outgoing_queue(orq->orq_agent->sa_out.inv_completed, orq); /* Timer D */ + } + } + } else outgoing_queue(orq->orq_agent->sa_out.trying, orq); }