[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] OPTIONS transaction handling

From: Thomas Reitmayr
Subject: [Linphone-developers] OPTIONS transaction handling
Date: Wed, 24 Jan 2007 12:58:59 -0800 (PST)

Hi Simon,
I still try to track down how transaction handling works for an OPTIONS dialog 
in linphone, respectively eXosip, to find out about the memory leak I wrote 
about earlier.

The following is what I think happens for this kind of transaction:
1. The OPTIONS request is received. No matching transaction is found in 
libosip2 so it gets accepted and a transaction record is allocated.
2. The NIST state machine is executed until the transaction reaches the 
'Completed' state.
3. The transaction is removed from the libosip2's list of transactions by one 
of the cb_*_kill_transaction routines, however at that exact point it cannot be 
removed from memory as libosip2 still needs it internally (in the loop going 
through all transactions).
4. Now after processing in libosip2 the transaction record could be removed 
from memory.

For other types of transactions the last step (4) seems to be performed using a 
copy of a pointer to the transaction record and investigating the transaction's 
state. However I have not found the OPTIONS transaction being referenced by one 
of these lists in eXosip, so with removing the pointer in libosip2 all 
references are gone and the memory is lost.

I have also performed some tests using netcat to confirm that steps 1 - 3 are 
executed, but 4 seems to be missing. However I might be wrong in some points of 
my investigation, so please correct me. My main question is still about step 4 
- how it works or how it is supposed to work to finally release the allocated 
Thanks in advance,

PS: A bit off-topic: During studying the code I found a possible bug in the 
following code:
  osip_set_kill_transaction_callback(osip ,OSIP_ICT_KILL_TRANSACTION,
  osip_set_kill_transaction_callback(osip ,OSIP_NIST_KILL_TRANSACTION,
  osip_set_kill_transaction_callback(osip ,OSIP_NICT_KILL_TRANSACTION,
  osip_set_kill_transaction_callback(osip ,OSIP_NIST_KILL_TRANSACTION,
The second function call should use OSIP_IST_KILL_TRANSACTION, otherwise IST 
transactions might not be removed from libosip2's list.

Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]