|
From: | FEICHTER Christoph |
Subject: | Re: [osip-dev] 101 Dialog Established |
Date: | Wed, 14 Oct 2015 12:38:01 +0000 |
hi, thanks for the fix for my fix ! I recognized my mem-leak right after I pressed ‘send’ ;-) br, christoph From: Aymeric Moizard [mailto:address@hidden
Hi Christoph, Again, tks for reporting & your patch proposal: I have commited the change with an additionnal line to avoid a memory leak with "answer" not being deallocated! Here is the patch in the git: Tks a lot again. Aymeric diff --git a/src/udp.c b/src/udp.c index 5edb6cf..1f85599 100644 --- a/src/udp.c +++ b/src/udp.c @@ -460,13 +460,14 @@ _eXosip_process_new_invite (struct eXosip_t *excontext, osip_transaction_t * tra } i = _eXosip_dialog_init_as_uas (&jd, evt->sip, answer); + osip_message_free (answer); if (i != 0) { OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL, "eXosip: cannot create dialog!\n")); osip_list_add (&excontext->j_transactions, transaction, 0); osip_transaction_set_reserved2 (transaction, NULL); - osip_message_free (answer); return; } + _eXosip_check_allow_header (jd, evt->sip); ADD_ELEMENT (jc->c_dialogs, jd); @@ -474,12 +475,8 @@ _eXosip_process_new_invite (struct eXosip_t *excontext, osip_transaction_t * tra osip_transaction_set_reserved2 (transaction, jc); osip_transaction_set_reserved3 (transaction, jd); - evt_answer = osip_new_outgoing_sipmessage (answer); - evt_answer->transactionid = transaction->transactionid; - _eXosip_update (excontext); jc->c_inc_tr = transaction; - osip_transaction_add_event (transaction, evt_answer); /* be sure the invite will be processed before any API call on this dialog */ 2015-10-14 12:24 GMT+02:00 Aymeric Moizard <address@hidden>:
... > > Yes... Seems to be. Usually, sending a 180 is made as soon as you receive the invite. That's most probably the reason why I've never hit the issue. I'm just explaining why i never hit the issue: in all my app, i'm sending *immediatly* a 180 when receiving an invite! So last_response contains the 180, immediately... Evaluated to 10ms max! ;) > what do you suggest how to fix it ? I will check your patch but it looks good: I don't think the 101 needs to be stored or process by the state machine because it's only there for dialog: I will check the code as I'm replying with my mobile... Regards > my first approach was the following (seems to work):
--
|
[Prev in Thread] | Current Thread | [Next in Thread] |