2008/5/19 Martin Drasar <[EMAIL PROTECTED]>: > Problem 1) > When the stack should end, I run that ugly piece of code, that calls > nua_sutdown(), does su_root_step() to receive the nua_r_shutdown event > and then calls nua_destroy(). However, even if I receive the > nua_r_shutdown event, nua_destroy() reports: FATAL: nua_shutdown not > completed.
I think I've got this message when I've tried to call nua_shutdown() twice or nua_destroy() on already destroyed nua. > Problem 2) > After calling the su_root_destroy() and su_deinit() the > su_pthread_port_clone_main is still running and waiting inside su_wait() > function. This leads to access violations whenever I try to unload sofia > library before shutting down the program. > su_root_destroy() documentation states that I should not call it from > cloned task. Is this the case? And if not, why does it fails to stop the > thread? su_init()/su_deinit() is per-process initialization stuff. You can use threads w/ Sofia in two alternative ways: 1/ You create thread by your self, and call su_root_create() by yourself. Then call su_root_run()/su_root_step() to process su_root_t stuff. When you want to exit from thread, you should call su_root_break() (if su_root_run()ing) and then su_root_destroy(). 2/ You call su_clone_start() and get su_clone_t reference. A new thread is created. When you'd want to get rid of that thread, you call su_clone_wait() from the main thread. -- Pekka.Pessi mail at nokia.com ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel