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 from the main thread I send a message (su_msg_send) to a clone task, with the message containing the msg_t and sip_t, and then from the clone do the lookup of the contact header I want to use, and (finally) then from the clone task send a reply message back to the main thread.....now when the main thread calls nta_msg_treply I get either a log message saying "mreply: cannot complete message", or it crashes. This is the case even if I simply try to send a 404 Not Found (i.e. ignoring the contact the worker thread is bringing back).
It seems like passing the msg_t and sip_t objects out of the main thread -- and using them beyond the lifespan of the sip message callback -- is the only difference I can see between the two scenarios. So my question is, do I need to do something to be able to continue to have access to the parameters passed to me in the stateless callback function after the time when that function returns? Or am I doing something else wrong? Also, once I do generate a final response, is it my responsibility to do anything to clear the memory associated with the objects related to that message (the sip_t and msg_t parameters I got from the stateless callback) Dave ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel