transport: do not disconnect transport on SIP transport error
commitdcc665015b63e9c77de6573c63fa747d59ef968a
authorStefan Becker <stefan.becker@nokia.com>
Wed, 26 May 2010 06:10:35 +0000 (26 09:10 +0300)
committerStefan Becker <stefan.becker@nokia.com>
Wed, 26 May 2010 06:10:35 +0000 (26 09:10 +0300)
tree0f27839c9cfb565d601be614741c2addfc91f382
parent6a968bfad1ae47cdab762b09769688d22a153dac
transport: do not disconnect transport on SIP transport error

In error case backend calls sip_transport_error() which called
sipe_backend_connection_error() (forwarded to purple) and then
sipe_backend_transport_disconnect(). That leaves sipe_private->transport NULL.
purple now calls sipe_close(), which calls sipe_core_deallocate() and that
tries to send SIP messages with sipe_private->transport == NULL -> *BOOM*

Now we don't disconnect on error and just wait for purple to close the
connection which will then call sipe_backend_transport_disconnect() *AFTER*
the last SIP message have been sent.

I can only hope that this doesn't leave a memory leak somewhere...
src/core/sip-transport.c