changeset 28396:0bf7defe41fd

More gracefully handle stream creation errors with Jingle calls.
author maiku@pidgin.im
date Sat, 22 Aug 2009 04:02:22 +0000
parents 98d8c11e4937
children 8bc115afec99
files libpurple/protocols/jabber/jingle/rtp.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jingle/rtp.c	Sat Aug 22 02:55:18 2009 +0000
+++ b/libpurple/protocols/jabber/jingle/rtp.c	Sat Aug 22 04:02:22 2009 +0000
@@ -607,8 +607,11 @@
 		is_creator = !jingle_session_is_initiator(session);
 	g_free(creator);
 
-	purple_media_add_stream(media, name, remote_jid,
-			type, is_creator, transmitter, num_params, params);
+	if(!purple_media_add_stream(media, name, remote_jid,
+			type, is_creator, transmitter, num_params, params)) {
+		purple_media_end(media, NULL, NULL);
+		return FALSE;
+	}
 
 	g_free(name);
 	g_free(media_type);