changeset 24956:b83c83143a69

Fix crash when remote client reconnects and tries to restart the media session.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Fri, 07 Nov 2008 03:14:10 +0000
parents c6c6dc6ccdc7
children 835a7003eed3
files libpurple/protocols/jabber/jingle/rtp.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jingle/rtp.c	Fri Nov 07 03:01:55 2008 +0000
+++ b/libpurple/protocols/jabber/jingle/rtp.c	Fri Nov 07 03:14:10 2008 +0000
@@ -565,7 +565,13 @@
 			GList *candidates = jingle_rtp_transport_to_candidates(transport);
 			GList *codecs = jingle_rtp_parse_codecs(description);
 
-			jingle_rtp_init_media(content);
+			if (jingle_rtp_init_media(content) == FALSE) {
+				/* XXX: send error */
+				jabber_iq_send(jingle_session_to_packet(session,
+						 JINGLE_SESSION_TERMINATE));
+				g_object_unref(session);
+				break;
+			}
 
 			purple_media_set_remote_codecs(jingle_rtp_get_media(session),
 					jingle_content_get_name(content),