Mercurial > pidgin
changeset 30525:3d08b59ebf59
Make the check for PRPL-supplied TURN parameters in the new place
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Thu, 18 Feb 2010 22:42:19 +0000 |
parents | 6d69151fa99b |
children | 8648453adb22 |
files | libpurple/media/backend-fs2.c |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/media/backend-fs2.c Thu Feb 18 22:20:06 2010 +0000 +++ b/libpurple/media/backend-fs2.c Thu Feb 18 22:42:19 2010 +0000 @@ -1584,6 +1584,18 @@ PurpleMediaBackendFs2Session *session; PurpleMediaBackendFs2Stream *stream; FsParticipant *participant; + /* 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. */ + gboolean got_turn_from_prpl = FALSE; + int i; + + for (i = 0 ; i < num_params ; i++) { + if (purple_strequal(params[i].name, "relay-info")) { + got_turn_from_prpl = TRUE; + break; + } + } memcpy(_params, params, sizeof(GParameter) * num_params); @@ -1603,7 +1615,7 @@ ++_num_params; } - if (turn_ip && !strcmp("nice", transmitter)) { + if (turn_ip && !strcmp("nice", transmitter) && !got_turn_from_prpl) { GValueArray *relay_info = g_value_array_new(0); GValue value; gint turn_port = purple_prefs_get_int(