Mercurial > pidgin.yaz
changeset 29598:18bc5ae20e23
Fix so emitting more HANGUP signals doesn't cause an assertion.
author | maiku@pidgin.im |
---|---|
date | Wed, 28 Oct 2009 17:58:59 +0000 |
parents | 86c23178a4fc |
children | 78ac6e4d3de9 |
files | libpurple/protocols/jabber/jingle/rtp.c |
diffstat | 1 files changed, 15 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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) {