changeset 30953:025fe823a921

Fix merge and a compilation error
author Marcus Lundblad <ml@update.uu.se>
date Sun, 14 Feb 2010 22:42:11 +0000
parents d873eeaccfc2
children 0f6ef3b21e17
files libpurple/media.c libpurple/network.h libpurple/protocols/jabber/jingle/jingle.c
diffstat 3 files changed, 19 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media.c	Fri Jan 08 23:33:51 2010 +0000
+++ b/libpurple/media.c	Sun Feb 14 22:42:11 2010 +0000
@@ -2754,7 +2754,13 @@
 		FsStream *fsstream = NULL;
 		const gchar *stun_ip = purple_network_get_stun_ip();
 		const gchar *turn_ip = purple_network_get_turn_ip();
-
+		guint new_num_params =
+					!stun_ip && !turn_ip ? num_params + 1 :
+					(stun_ip && is_nice) && turn_ip ?
+					num_params + 3 : num_params + 2;
+		guint next_param_index = num_params;
+		GParameter *param = g_new0(GParameter, new_num_params);
+		
 		/* check if the prpl has already specified a relay-info
 		 we need to do this to allow them to override when using non-standard
 		 TURN modes, like Google f.ex. */
@@ -2768,14 +2774,15 @@
 			}
 		}
 
+		memcpy(param, params, sizeof(GParameter) * num_params);
+
+		/* set controlling mode according to direction */
+		param[next_param_index].name = "controlling-mode";
+		g_value_init(&param[next_param_index].value, G_TYPE_BOOLEAN);
+		g_value_set_boolean(&param[next_param_index].value, initiator);
+		next_param_index++;
+
 		if (stun_ip || (turn_ip && !got_turn_from_prpl)) {
-			guint new_num_params = 
-					(stun_ip && is_nice && turn_ip && !got_turn_from_prpl) ?
-					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);
-
 			if (stun_ip) {
 				purple_debug_info("media", 
 					"setting property stun-ip on new stream: %s\n", stun_ip);
--- a/libpurple/network.h	Fri Jan 08 23:33:51 2010 +0000
+++ b/libpurple/network.h	Sun Feb 14 22:42:11 2010 +0000
@@ -252,7 +252,7 @@
 void purple_network_set_turn_server(const gchar *turn_server);
 	
 /**
- * Get the IP address of the STUN server as a string representation
+ * Get the IP address of the TURN server as a string representation
  *
  * @return the IP address
  * @since 2.6.0
--- a/libpurple/protocols/jabber/jingle/jingle.c	Fri Jan 08 23:33:51 2010 +0000
+++ b/libpurple/protocols/jabber/jingle/jingle.c	Sun Feb 14 22:42:11 2010 +0000
@@ -35,6 +35,9 @@
 #include "rtp.h"
 
 #include <string.h>
+#ifdef USE_VV
+#include <gst/gst.h>
+#endif
 
 GType
 jingle_get_type(const gchar *type)