From 773894bc2d595b3a0f4fec0fc908e83de4b92905 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 6 Dec 2007 19:18:42 +0000 Subject: [PATCH] if the leg is already destroyed, just kill the original request. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6541 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c b/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c index 93feb9c510..f2214e8f47 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c +++ b/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c @@ -1089,9 +1089,14 @@ int nua_invite_client_ack(nua_client_request_t *cr, tagi_t const *tags) char const *phrase = "OK", *reason = NULL; char const *invite_branch; - assert(ds->ds_leg); assert(cr->cr_orq); + if (!ds->ds_leg) { + nta_outgoing_destroy(cr->cr_orq); + return -1; + } + + msg = nta_outgoing_getrequest(cr->cr_orq); sip = sip_object(msg); if (!msg)