]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[sofia-sip] Fix crash in timer B outgoing_timer_bf() which asserts if INVITE request...
authorAndrey Volk <andywolk@gmail.com>
Thu, 16 Apr 2020 00:17:16 +0000 (04:17 +0400)
committerAndrey Volk <andywolk@gmail.com>
Wed, 6 May 2020 23:07:20 +0000 (03:07 +0400)
libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/nta/nta.c

index 4fe074aa9799cf2fa8772995b8d6a0bb2b532f74..70251da952afe9f7f6ee4d5ce662bea47730f857 100644 (file)
@@ -1 +1 @@
-Wed Apr  1 12:53:24 MDT 2020
+Thu Apr 16 17:42:40 UTC 2020
index ca67cc032fe8dab7ba040e2d27ece1c9ffecb4a0..07bab4f6eb1e7f6d17a330ec0bbe647ab665cf94 100644 (file)
@@ -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);
 }