Commit d73a8654 authored by Youness Alaoui's avatar Youness Alaoui
Browse files

Fix TURN MSN for WLM2009 compat

parent 6c6c1d3d
...@@ -688,7 +688,8 @@ static void priv_turn_allocate_refresh_tick_unlocked (CandidateRefresh *cand) ...@@ -688,7 +688,8 @@ static void priv_turn_allocate_refresh_tick_unlocked (CandidateRefresh *cand)
password = (uint8_t *)cand->turn->password; password = (uint8_t *)cand->turn->password;
password_len = (size_t) strlen (cand->turn->password); password_len = (size_t) strlen (cand->turn->password);
if (cand->agent->compatibility == NICE_COMPATIBILITY_MSN) { if (agent_to_turn_compatibility (cand->agent) ==
STUN_USAGE_TURN_COMPATIBILITY_MSN) {
username = g_base64_decode ((gchar *)username, &username_len); username = g_base64_decode ((gchar *)username, &username_len);
password = g_base64_decode ((gchar *)password, &password_len); password = g_base64_decode ((gchar *)password, &password_len);
} }
...@@ -700,7 +701,8 @@ static void priv_turn_allocate_refresh_tick_unlocked (CandidateRefresh *cand) ...@@ -700,7 +701,8 @@ static void priv_turn_allocate_refresh_tick_unlocked (CandidateRefresh *cand)
password, password_len, password, password_len,
agent_to_turn_compatibility (cand->agent)); agent_to_turn_compatibility (cand->agent));
if (cand->agent->compatibility == NICE_COMPATIBILITY_MSN) { if (agent_to_turn_compatibility (cand->agent) ==
STUN_USAGE_TURN_COMPATIBILITY_MSN) {
g_free (cand->msn_turn_username); g_free (cand->msn_turn_username);
g_free (cand->msn_turn_password); g_free (cand->msn_turn_password);
cand->msn_turn_username = username; cand->msn_turn_username = username;
......
...@@ -160,7 +160,7 @@ void refresh_free_item (gpointer data, gpointer user_data) ...@@ -160,7 +160,7 @@ void refresh_free_item (gpointer data, gpointer user_data)
password = (uint8_t *)cand->turn->password; password = (uint8_t *)cand->turn->password;
password_len = (size_t) strlen (cand->turn->password); password_len = (size_t) strlen (cand->turn->password);
if (agent->compatibility == NICE_COMPATIBILITY_MSN) { if (agent_to_turn_compatibility (agent) == STUN_USAGE_TURN_COMPATIBILITY_MSN) {
username = g_base64_decode ((gchar *)username, &username_len); username = g_base64_decode ((gchar *)username, &username_len);
password = g_base64_decode ((gchar *)password, &password_len); password = g_base64_decode ((gchar *)password, &password_len);
} }
...@@ -181,7 +181,7 @@ void refresh_free_item (gpointer data, gpointer user_data) ...@@ -181,7 +181,7 @@ void refresh_free_item (gpointer data, gpointer user_data)
} }
if (agent->compatibility == NICE_COMPATIBILITY_MSN) { if (agent_to_turn_compatibility (agent) == STUN_USAGE_TURN_COMPATIBILITY_MSN) {
g_free (username); g_free (username);
g_free (password); g_free (password);
} }
...@@ -834,7 +834,8 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer) ...@@ -834,7 +834,8 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
uint8_t *password = (uint8_t *)cand->turn->password; uint8_t *password = (uint8_t *)cand->turn->password;
size_t password_len = (size_t) strlen (cand->turn->password); size_t password_len = (size_t) strlen (cand->turn->password);
if (agent->compatibility == NICE_COMPATIBILITY_MSN) { if (agent_to_turn_compatibility (agent) ==
STUN_USAGE_TURN_COMPATIBILITY_MSN) {
username = g_base64_decode ((gchar *)username, &username_len); username = g_base64_decode ((gchar *)username, &username_len);
password = g_base64_decode ((gchar *)password, &password_len); password = g_base64_decode ((gchar *)password, &password_len);
} }
...@@ -848,7 +849,8 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer) ...@@ -848,7 +849,8 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
password, password_len, password, password_len,
agent_to_turn_compatibility (agent)); agent_to_turn_compatibility (agent));
if (agent->compatibility == NICE_COMPATIBILITY_MSN) { if (agent_to_turn_compatibility (agent) ==
STUN_USAGE_TURN_COMPATIBILITY_MSN) {
g_free (cand->msn_turn_username); g_free (cand->msn_turn_username);
g_free (cand->msn_turn_password); g_free (cand->msn_turn_password);
cand->msn_turn_username = username; cand->msn_turn_username = username;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment