# HG changeset patch # User maiku@pidgin.im # Date 1256752739 0 # Node ID 18bc5ae20e23a8ee0e57c73a8726f54aaf615a9e # Parent 86c23178a4fc105da52b64d73c6aa16e8681be5d Fix so emitting more HANGUP signals doesn't cause an assertion. diff -r 86c23178a4fc -r 18bc5ae20e23 libpurple/protocols/jabber/jingle/rtp.c --- a/libpurple/protocols/jabber/jingle/rtp.c Wed Oct 28 17:15:43 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/rtp.c Wed Oct 28 17:58:59 2009 +0000 @@ -468,13 +468,22 @@ g_return_if_fail(JINGLE_IS_SESSION(session)); - if (type == PURPLE_MEDIA_INFO_HANGUP) { + if (type == PURPLE_MEDIA_INFO_HANGUP || + type == PURPLE_MEDIA_INFO_REJECT) { jabber_iq_send(jingle_session_terminate_packet( - session, "success")); - g_object_unref(session); - } else if (type == PURPLE_MEDIA_INFO_REJECT) { - jabber_iq_send(jingle_session_terminate_packet( - session, "decline")); + session, type == PURPLE_MEDIA_INFO_HANGUP ? + "success" : "decline")); + + g_signal_handlers_disconnect_by_func(G_OBJECT(media), + G_CALLBACK(jingle_rtp_state_changed_cb), + session); + g_signal_handlers_disconnect_by_func(G_OBJECT(media), + G_CALLBACK(jingle_rtp_stream_info_cb), + session); + g_signal_handlers_disconnect_by_func(G_OBJECT(media), + G_CALLBACK(jingle_rtp_new_candidate_cb), + session); + g_object_unref(session); } else if (type == PURPLE_MEDIA_INFO_ACCEPT && jingle_session_is_initiator(session) == FALSE) {