Could anyone provide me a patch for 1.12.6 so that I can preserve my
application as shown below? That is, I invoke nua_create/nua_destroy from
my main application thread, and call su_root_run() from a separate thread,
as shown below.
void main(...)
{
su_init();
su_home_init();
su_root_create();
su_root_threading();
nua_create();
su_root_threading();
nua_create();
pthread_create(&main_sip_root_thread, ...); // Creates thread that
calls
su_root_run()
nua_handle();
nua_register();
nua_handle();
nua_register();
...
nua_destroy();
...
}
void main_sip_root_thread(...)
{
while(1) {
su_root_run();
assert();
}
}
Best Regards,
Jerry
-----Original Message-----
From:
Sent: Friday, September 21, 2007 2:46 PM
To: '[email protected]'
Subject: RE: [Sofia-sip-devel] FW: Initialization of Sofia SIP v1.12.6
Error
Hmmm... I think that's not a good design, unless I'm not understanding
something.
Currently, with 1.12.4, my call control application thread handles messages
from other application threads that include removing/adding new lines (i.e.
multiple NUAs). If it is now a 1.12.6 requirement that the su_root_ thread
calls nua_create(), how would my call control thread communicate to the
su_root_ thread to invoke nua_create()?
My su_root_thread_ is very simple as shown below:
while(1) {
su_root_run();
assert();
}
Best Regards,
Jerry
-----Original Message-----
From: Pekka Pessi [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 19, 2007 6:27 AM
To: Jerry Richards
Cc: [email protected]
Subject: Re: [Sofia-sip-devel] FW: Initialization of Sofia SIP v1.12.6
Error
2007/9/18, Jerry Richards <[EMAIL PROTECTED]>:
> My 1.12.4 based application always called su_root_create() and
nua_create()
> first, then called su_root_run() from a newly created thread. After that,
> nua_register() is called.
>
> Did something in this area change in version 1.12.6?
Unfortunately, yes. Now some su_root_ functions use the thread ID to
do some optimizations. So you have to call su_root_create() and
nua-create() from the same thread that acutally runs the stack.
--
Pekka.Pessi mail at nokia.com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel