Destroying transports

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

 



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





[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