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 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4657 bytes Desc: not available URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100921/87f8faef/attachment-0001.p7s>