[Sofia-sip-devel] question on lifetime of msg_t, sip_t objects after stateless callback

2010-01-03 Thread Dave Horton
Hi - I am writing a fairly simply stateless redirect server. It is multithreaded, where the main thread creates the root task and runs the thread loop, and receives incoming SIP invites. If I simply respond to the INVITE with nta_msg_treply in the main thread, everything works. However, if

Re: [Sofia-sip-devel] question on lifetime of msg_t, sip_t objects after stateless callback

2010-01-04 Thread Aleksander Morgado
HI Dave, > I am writing a fairly simply stateless redirect server. It is > multithreaded, where the main thread creates the root task and runs the > thread loop, and receives incoming SIP invites. If I simply respond to the > INVITE with nta_msg_treply in the main thread, everything works. How

Re: [Sofia-sip-devel] question on lifetime of msg_t, sip_t objects after stateless callback

2010-01-04 Thread Dave Horton
Thanks Aleksander, I had actually seen your thread from some time ago and it was what inspired me to take this general approach. So thanks twice! I have figured out some of my problem, and also have a few questions about some of the suggestions below. First, after fiddling with my code, I see

Re: [Sofia-sip-devel] question on lifetime of msg_t, sip_t objects after stateless callback

2010-01-04 Thread Aleksander Morgado
Hi Dave, Thanks Aleksander, I had actually seen your thread from some time ago and it > was what inspired me to take this general approach. So thanks twice! > :-) > > I have figured out some of my problem, and also have a few questions about > some of the suggestions below. First, after fiddl

Re: [Sofia-sip-devel] question on lifetime of msg_t, sip_t objects after stateless callback

2010-01-04 Thread Dave Horton
Hi Aleksander, I did a few tests, and this is what I learned: 1) Sending the provisional response definitely seems to mark the message for deletion, reclamation, whatever. I did a simple test of trying to send a final response from the main loop right after sending a 100 Trying and got the sa

Re: [Sofia-sip-devel] question on lifetime of msg_t, sip_t objects after stateless callback

2010-01-04 Thread Aleksander Morgado
Hi Dave, > 1) Sending the provisional response definitely seems to mark the message > for deletion, reclamation, whatever. I did a simple test of trying to send > a final response from the main loop right after sending a 100 Trying and got > the same "message could not be completed" message. So

Re: [Sofia-sip-devel] question on lifetime of msg_t, sip_t objects after stateless callback

2010-01-04 Thread Dave Horton
>>There aren't successful INVITEs? What is it exactly what your app is doing? Sorry, I was classifying any non-200 response as non-success. Mainly I am returning 300 Multiple Choices responses. On Jan 4, 2010, at 11:59 AM, Aleksander Morgado wrote: > Hi Dave, > > > 1) Sending the provision

Re: [Sofia-sip-devel] question on lifetime of msg_t, sip_t objects after stateless callback

2010-01-09 Thread Dave Horton
Just to follow up on this. I modified the code to run in stateful mode and did not encounter the problems I had in stateless. I also see that in stateful mode the stack does generate a 100 Trying if the N1 timer expires, and that it also handles an incoming CANCEL of a transaction by sending a