Mercurial > pidgin
changeset 30522:0f6ef3b21e17
merge of '4e5f78559deacc45eb458cdbe7ffc96491ab11bd'
and '97f70a97fe41a0319d0041706ffaf3a6e4f0367d'
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Sun, 14 Feb 2010 22:42:20 +0000 |
parents | 48f70e888c04 (current diff) 025fe823a921 (diff) |
children | ee3226c6092f |
files | libpurple/media.c |
diffstat | 2 files changed, 18 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/media.c Sun Feb 14 22:26:14 2010 +0000 +++ b/libpurple/media.c Sun Feb 14 22:42:20 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(¶m[next_param_index].value, G_TYPE_BOOLEAN); + g_value_set_boolean(¶m[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/protocols/jabber/jingle/jingle.c Sun Feb 14 22:26:14 2010 +0000 +++ b/libpurple/protocols/jabber/jingle/jingle.c Sun Feb 14 22:42:20 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)