diff options
author | dequis <dx@dxzone.com.ar> | 2015-11-19 13:44:29 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-11-19 13:44:29 -0300 |
commit | 72d107e543aeb8766140f258f48bda8bca88343d (patch) | |
tree | 67f92568496d69fe7b0c66f984ae504c9e18efc9 /facebook/facebook-api.c | |
parent | e91ef973e98e8b2bb1f60f057a87d20994aac2a0 (diff) | |
download | bitlbee-facebook-72d107e543aeb8766140f258f48bda8bca88343d.tar.gz bitlbee-facebook-72d107e543aeb8766140f258f48bda8bca88343d.tar.bz2 bitlbee-facebook-72d107e543aeb8766140f258f48bda8bca88343d.tar.xz |
mqtt: fix segfaults after disconnecting on write
Any call to fb_mqtt_write() can result in an error writing to the
socket, which means fb_mqtt_close() can be called and the mqtt object is
invalidated.
Trying to write priv->tev = 0 at that point is a small invalid write,
but not enough to make it crash. The real problem is fb_mqtt_timeout(),
which adds a 90 second delay after which it *does* crash, often when a
different account already finished logging.
The fix here takes advantage of the cleanup done by fb_mqtt_close() - by
adding the timeout before that call, it will find a nonzero priv->tev
and remove it.
Diffstat (limited to 'facebook/facebook-api.c')
0 files changed, 0 insertions, 0 deletions