[pjsip] Destroying transports

Philippe philippe.leuba at eyepmedia.com
Thu Feb 21 08:22:17 EST 2008


Hi Benny,

Do you have any news regarding this problem?

Best regards

Philippe Leuba

-----Original Message-----
From: pjsip-bounces at lists.pjsip.org [mailto:pjsip-bounces at lists.pjsip.org]
On Behalf Of Benny Prijono
Sent: mardi, 4. décembre 2007 04:05
To: pjsip embedded/DSP SIP discussion
Subject: Re: [pjsip] Destroying transports

Christian Grigis wrote:
> Hello Benny,
> 
> We ran into an issue regarding the destruction of transports.
> 
> While we do not use the pjsua layer, we destroy transports associated to
> an account using code similar to pjsua_transport_close(), i.e.
> pjsip_transport_shutdown() for UDP and factory->destroy() for TCP and
> TLS listeners.
> 
> When we quit our application, we call pjsip_endpt_destroy(), but that
> results in a crash further down in tls_destroy() (in case of a TLS
> listener) at the following line:
> 
>    pjsip_endpt_cancel_timer(tls->listener->endpt, &tls->ka_timer);
> 
> because tls->listener is no longer valid at this point.
> 
> Is this normal, i.e. should we be destroying listeners differently?
> Or is it a bug in pjsip_endpt_destroy(), in the sense that it should
> test whether listeners are still valid?

Hi Christian,

thanks for the report, and I can reproduce it here. While there's a 
bug in the TLS transport which I'm going to fix it soon, is there 
any particular reason why do you need to manually destroy the 
transports? Normally we just need to call pjsip_endpt_destroy() and 
it will take care of closing down all the transports and listeners.

cheers,
  -benny


> Thank you, and best regards.
> 
> -Christian



_______________________________________________
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





More information about the pjsip mailing list