# HG changeset patch # User Marcus Lundblad # Date 1266532939 0 # Node ID 3d08b59ebf59fc7d9319b341f1c9a33430cf3ccb # Parent 6d69151fa99b6ed429c84654fa882f27ed715674 Make the check for PRPL-supplied TURN parameters in the new place diff -r 6d69151fa99b -r 3d08b59ebf59 libpurple/media/backend-fs2.c --- 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(