cpw.maiku.media_refactor: 35b20906: Fix so emitting more HANGUP signals does...

maiku at pidgin.im maiku at pidgin.im
Wed Oct 28 16:12:22 EDT 2009


-----------------------------------------------------------------
Revision: 35b20906ff16f1ce992fbfb63e26b071330b8050
Ancestor: a8b3fa072d35b911e7d4ece3bd4ef7c27f271124
Author: maiku at pidgin.im
Date: 2009-10-28T17:58:59
Branch: im.pidgin.cpw.maiku.media_refactor
URL: http://d.pidgin.im/viewmtn/revision/info/35b20906ff16f1ce992fbfb63e26b071330b8050

Modified files:
        libpurple/protocols/jabber/jingle/rtp.c

ChangeLog: 

Fix so emitting more HANGUP signals doesn't cause an assertion.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jingle/rtp.c	49fe4058345a502d41b67c6f51fce3786d05354e
+++ libpurple/protocols/jabber/jingle/rtp.c	bdbb930ad432bf04fbbf6717d7e6c72411b914ef
@@ -468,14 +468,23 @@ jingle_rtp_stream_info_cb(PurpleMedia *m
 
 	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"));
+				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_REJECT) {
-		jabber_iq_send(jingle_session_terminate_packet(
-				session, "decline"));
-		g_object_unref(session);
 	} else if (type == PURPLE_MEDIA_INFO_ACCEPT &&
 			jingle_session_is_initiator(session) == FALSE) {
 		jingle_rtp_ready(session);


More information about the Commits mailing list