Sorry for the dumb question, but how do I incorporate this patch into my
1.12.6 version?  I went to the darcs site and believe I found the right
patch:

http://sofia-sip.org/repos/sofia-sip/_darcs/patches/20071005112209-55b16-a77
833d930ab3e9d57c52cd32b01eef5507476d3.gz

Then I copied the contents of this using my Mozilla Firefox browser to a
file called PekkasPatch located at the top-level of sofia-sip.  Then I tried
the following command, but it didn't work:

patch * PekkasPatch

Do I need to cut-and-paste the changes for each file and patch them
separately?

Best Regards,
Jerry



-----Original Message-----
From: Pekka Pessi [mailto:[EMAIL PROTECTED]
Sent: Monday, October 08, 2007 6:41 AM
To: Jerry Richards
Cc: sofia-sip-devel@lists.sourceforge.net
Subject: Re: [Sofia-sip-devel] Sofia SIP v1.12.6 Design


2007/9/25, Jerry Richards <[EMAIL PROTECTED]>:
> 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.

I just pushed patch to darcs repo with su_root_release()/su_root_obtain().

A single thread can run (call su_root_step(), su_root_run(), or
su_root_sleep())  the su_root_t object at a time, but now the thread
can be swapped. The su_root_release()  unlocks the mutex holding root
and su_root_obtain() locks the mutex ensuring the exclusive run.

So you have to add su_root_release() before calling pthread_create(),
and put su_root_obtain()/su_root_release() around the main loop in
thread function.

--Pekka

> 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();
>         ...
> }

--
Pekka.Pessi mail at nokia.com


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to