Registering thread fails...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Looks like it is fixed. I'll run more tests on this revision later and I guess if you don't hear from me, I have no problems.

On Sep 22, 2010, at 2:50 AM, Benny Prijono wrote:

> Right, turns out there was a bug after all, I just fixed this in
> https://trac.pjsip.org/repos/ticket/1132, thanks.
> 
> FYI, the call to registerThread() in startSIPBackground() is
> unnecessary, as pjsua_create() would call pj_init() and this
> implicitly registers the current thread.
> 
> Best regards,
>  Benny
> 
> On Wed, Sep 22, 2010 at 1:11 PM, Mr. Gecko <grmrgecko at gmail.com> wrote:
>> Gone ahead and wrote it tonight, long story.
>> Here is the c implementation at http://mrgeckosmedia.net/PJTest.zip. I get the same result from it as I do in my full application. I am using revision 3310 as noted in the note file. This is set to compile for the mac, so if you are not on a mac, you'll have to compile using your own method.
>> 
>> Thanks for any help,
>> Mr. Gecko
>> 
>> On Sep 21, 2010, at 11:55 PM, Benny Prijono wrote:
>> 
>>> Am I right to say that you use local variable for your PJThreadDesc?
>>> This variable needs to be valid for the duration of the thread, so you
>>> can't use local variable for it.
>>> 
>>> Other than that, I don't know. As I said, I'd prefer to see small
>>> program to reproduce this, not a complete app which I can't even
>>> compile.
>>> 
>>> Best regards,
>>>  Benny
>>> 
>>> On Wed, Sep 22, 2010 at 8:49 AM, Mr. Gecko <grmrgecko at gmail.com> wrote:
>>>> I have the complete application's source code up at http://opensource.mrgeckosmedia.com/?a=tree&p=VoiceMac&h=06da2d96a78b2b5cd1a12a19387b9bfd7c8366ba&hb=7278b4e61267fad3419e10eed400a8da5edf2c43&f=Classes/VoiceBase/SIP if that will help.
>>>> 
>>>> On Sep 21, 2010, at 8:45 PM, Benny Prijono wrote:
>>>> 
>>>>> I don't know what the problem either, since I only see snippet of your
>>>>> program. If you can, make a small (100 line-ish) but complete program
>>>>> to demonstrate this and I'll see what the problem is.
>>>>> 
>>>>> Best regards,
>>>>>  Benny
>>>>> 
>>>>> 
>>>>> On Wed, Sep 22, 2010 at 12:45 AM, Mr. Gecko <grmrgecko at gmail.com> wrote:
>>>>>> I tried that with no effect. I also get this problem randomly with other
>>>>>> things so it may not only be a problem with stopping pjsua. I changed the
>>>>>> code so I can bzero the threads that I register, so here is what my code
>>>>>> looks like now.
>>>>>> - (void)registerThread:(pj_thread_desc *)thePJThreadDesc {
>>>>>> if (!pj_thread_is_registered()) {
>>>>>> pj_thread_t *PJThread;
>>>>>> pj_status_t status = pj_thread_register(NULL, *thePJThreadDesc, &PJThread);
>>>>>> if (status!=PJ_SUCCESS)
>>>>>> NSLog(@"Error registering thread for PJSUA with status %d", status);
>>>>>> }
>>>>>> }
>>>>>> pj_thread_desc PJThreadDesc;
>>>>>> [self registerThread:&PJThreadDesc];
>>>>>> 
>>>>>> if (ringbackPort!=NULL && ringbackSlot!=PJSUA_INVALID_ID) {
>>>>>> pjsua_conf_remove_port(ringbackSlot);
>>>>>> ringbackSlot = PJSUA_INVALID_ID;
>>>>>> pjmedia_port_destroy(ringbackPort);
>>>>>> ringbackPort = NULL;
>>>>>> }
>>>>>> 
>>>>>> if (PJPool!=NULL) {
>>>>>> pj_pool_release(PJPool);
>>>>>> PJPool = NULL;
>>>>>> }
>>>>>> pjsua_transport_close(UDPTransport, PJ_FALSE);
>>>>>> pjsua_transport_close(TCPTransport, PJ_FALSE);
>>>>>> 
>>>>>> status = pjsua_destroy();
>>>>>> if (status!=PJ_SUCCESS)
>>>>>> NSLog(@"Error stopping SIP");
>>>>>> bzero(&PJThreadDesc, sizeof(pj_thread_desc));
>>>>>> I am on a mac using cocoa if you didn't know. This is the one problem I have
>>>>>> no understanding of as I do not know the implementation of PJSIP.
>>>>> 
>>>>> _______________________________________________
>>>>> Visit our blog: http://blog.pjsip.org
>>>>> 
>>>>> pjsip mailing list
>>>>> pjsip at lists.pjsip.org
>>>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Visit our blog: http://blog.pjsip.org
>>>> 
>>>> pjsip mailing list
>>>> pjsip at lists.pjsip.org
>>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>>> 
>>>> 
>>> 
>>> _______________________________________________
>>> Visit our blog: http://blog.pjsip.org
>>> 
>>> pjsip mailing list
>>> pjsip at lists.pjsip.org
>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>> 
>> 
> 
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
> 
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux