Registering thread fails...

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

 



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.



[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