Le mardi 22 août 2006 04:02, Kannaiyan Natesan a écrit : > Hi Simon, > > Thanks your kind reply. > > Receive is in a seperate Thread. > Transmit is in a seperate Thread. > > session_destroy is in a seperate thread. > > WIth regardless of any condition I just called session_destroy, it must > release the recv function right? Clearly not. When using the RtpSession api through several threads, you must implement your own locking mechanism to ensure that no thread is using the RtpSession while another one destroys it. It's true for mostly all C/C++ libraries: for example in GTK you must not call gtk_entry_get_text() while another thread is doing gtk_widget_destroy(). More simply you must not do char *mystring; printf(mystring); while another thread is doing free(mystring); You must wait your recv thread to finish working with the RtpSession before the other destroys the RtpSession.
Simon _______________________________________________ Linphone-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/linphone-users
