Patches item #2789126, was opened at 2009-05-08 20:17
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2789126&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.5.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: John Riordan (john_riordan)
>Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: extend tm uac functions to support tmcb release function

Initial Comment:
Currently there does not appear to be a reliable way to cleanup callback 
parameters passed to the tm uac functions - t_request, t_request_within, etc.. 
This patch extends the tm uac functions to support the tmcb release function 
for tm callback parameter cleanup. This is based on work done earlier which 
added the infrastructure necessary to do proper cleanup and here we are 
extending the existing uac functions to use that earlier work done in...
                                                                                
                                                                                
                                                                                
                              
    Author: dan_pascu <dan_pa...@689a6050-402a-0410-94f2-e92a70836424>          
                                                       
    Date:   Thu Nov 20 18:55:23 2008 +0000                                      
                                                       
                                                                                
                                                       
        Added infrastructure for tm callback parameter cleanup. Fixed memory 
corruption caused by invalid freeing of dialogs           
                                                                                
                                                       
        git-svn-id: 
https://opensips.svn.sourceforge.net/svnroot/opensips/tr...@4992 
689a6050-402a-0410-94f2-e92a70836424              

Currently, callback parameters cannot be reliably cleaned up. For example, when 
using t_request to send an INVITE and the uas responds with a 200 but then the 
ACK(s) gets lost and the uas continues sending 200s the callback is called 
repeatedly with an indication that the request was completed so one is faced 
with either not freeing the callback parameters (leaking memory) or freeing 
them repeatedly (ah, umm).

Regardless, proper cleanup can best be done by utilizing the release function 
infrastructure.


----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2009-05-09 10:28

Message:
Hi John,

I'm not 100% sure this is needed.
Currently all local UAC transaction do trigger a TMCB_LOCAL_COMPLETED
callback when the transaction is completed. So you can use this callback to
cleanup whatever params you attached to the transaction.
In regards to the multiple 200 OK (retransmissions), the registered
callback function should first check if the received param is NULL and if
so, to exit. If not NULL,  it should free it and set it to NULL to avoid
sequential executions.
As an example, see in the CPL module, the cpl_proxy.h , reply_callback()
function, how the param (inter var) is freed.

Regards,
Bogdan 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2789126&group_id=232389

_______________________________________________
Devel mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to