pidgin.vv: 7547d4da: Fix assertion stating FsRawUdpTransmitte...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Thu Mar 19 08:50:40 EDT 2009


-----------------------------------------------------------------
Revision: 7547d4da71a4662f3a562ba5d14d876935d3e0b0
Ancestor: 7bebea53e8f547e5ef832cc2101be1c0dd2cf24d
Author: maiku at soc.pidgin.im
Date: 2009-03-19T12:26:01
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/7547d4da71a4662f3a562ba5d14d876935d3e0b0

Modified files:
        libpurple/media.c

ChangeLog: 

Fix assertion stating FsRawUdpTransmitter doesn't have a relay-info 
property.

-------------- next part --------------
============================================================
--- libpurple/media.c	81b0ab000d4b97a5967103ff3c5141b92d1f91c1
+++ libpurple/media.c	818d453786cb1ec79d316051bc2dc4b3487a6e90
@@ -1886,6 +1886,7 @@ purple_media_add_stream_internal(PurpleM
 	PurpleMediaStream *stream = NULL;
 	FsStreamDirection *direction = NULL;
 	PurpleMediaSessionType session_type;
+	gboolean is_nice = !strcmp(transmitter, "nice");
 
 	g_return_val_if_fail(PURPLE_IS_MEDIA(media), FALSE);
 
@@ -1939,7 +1940,7 @@ purple_media_add_stream_internal(PurpleM
 		 * receiving the src-pad-added signal.
 		 * Only works for non-multicast FsRtpSessions.
 		 */
-		if (!strcmp(transmitter, "nice") || !strcmp(transmitter, "rawudp"))
+		if (is_nice || !strcmp(transmitter, "rawudp"))
 			g_object_set(G_OBJECT(session->session),
 					"no-rtcp-timeout", 0, NULL);
 
@@ -1986,7 +1987,8 @@ purple_media_add_stream_internal(PurpleM
 
 		if (stun_ip || turn_ip) {
 			guint new_num_params = 
-				stun_ip && turn_ip ? num_params + 2 : num_params + 1;
+					(stun_ip && is_nice) && turn_ip ?
+					num_params + 2 : num_params + 1;
 			guint next_param_index = num_params;
 			GParameter *param = g_new0(GParameter, new_num_params);
 			memcpy(param, params, sizeof(GParameter) * num_params);
@@ -2001,7 +2003,7 @@ purple_media_add_stream_internal(PurpleM
 				next_param_index++;
 			}
 
-			if (turn_ip) {
+			if (turn_ip && is_nice) {
 				GValueArray *relay_info = g_value_array_new(0);
 				GValue value;
 				gint turn_port = 


More information about the Commits mailing list