From: David Woodhouse Date: Tue, 5 Dec 2017 13:30:04 +0000 (+0000) Subject: Explicitly close ChimeConnection in chime_purple_close() X-Git-Tag: v0.9~104 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8c9e29546223e8eaffc9a10ee5cfa90eb851a521;p=pidgin-chime.git Explicitly close ChimeConnection in chime_purple_close() Instead of allowing it to be implicitly closed by the final unref, close it explicitly. This allows us to fix up the refcounting elsewhere, so the objects associated with the connection can just hold a ref to it. It was kind of OK for rooms/conversations but it's getting silly with meetings adn calls. --- diff --git a/chime.c b/chime.c index fa22d37..7c01b08 100644 --- a/chime.c +++ b/chime.c @@ -244,11 +244,12 @@ static void chime_purple_close(PurpleConnection *conn) g_signal_handlers_disconnect_matched(pc->cxn, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, conn); + chime_connection_disconnect(pc->cxn); g_clear_object(&pc->cxn); g_free(pc); purple_connection_set_protocol_data(conn, NULL); - purple_debug(PURPLE_DEBUG_INFO, "chime", "Chime close"); + purple_debug(PURPLE_DEBUG_INFO, "chime", "Chime close\n"); }