Commit ab9bf4a2 authored by Youness Alaoui's avatar Youness Alaoui

add a long term credential flag for relay information

parent 67de9fcd
...@@ -729,7 +729,8 @@ nice_agent_add_stream ( ...@@ -729,7 +729,8 @@ nice_agent_add_stream (
NICEAPI_EXPORT void nice_agent_set_relay_info(NiceAgent *agent, NICEAPI_EXPORT void nice_agent_set_relay_info(NiceAgent *agent,
guint stream_id, guint component_id, guint stream_id, guint component_id,
const gchar *server_ip, guint server_port, const gchar *server_ip, guint server_port,
const gchar *username, const gchar *password) const gchar *username, const gchar *password,
gboolean long_term_credentials)
{ {
Component *component = NULL; Component *component = NULL;
...@@ -743,11 +744,15 @@ NICEAPI_EXPORT void nice_agent_set_relay_info(NiceAgent *agent, ...@@ -743,11 +744,15 @@ NICEAPI_EXPORT void nice_agent_set_relay_info(NiceAgent *agent,
nice_address_set_port (&component->turn_server, server_port); nice_address_set_port (&component->turn_server, server_port);
} }
g_free (component->turn_username); g_free (component->turn_username);
component->turn_username = g_strdup (username); component->turn_username = g_strdup (username);
g_free (component->turn_password); g_free (component->turn_password);
component->turn_password = g_strdup (password); component->turn_password = g_strdup (password);
component->turn_long_term = long_term_credentials;
} }
g_static_rec_mutex_unlock (&agent->mutex); g_static_rec_mutex_unlock (&agent->mutex);
} }
......
...@@ -146,7 +146,8 @@ void nice_agent_set_relay_info( ...@@ -146,7 +146,8 @@ void nice_agent_set_relay_info(
const gchar *server_ip, const gchar *server_ip,
guint server_port, guint server_port,
const gchar *username, const gchar *username,
const gchar *password); const gchar *password,
gboolean long_term_credentials);
void void
nice_agent_gather_candidates ( nice_agent_gather_candidates (
......
...@@ -85,6 +85,7 @@ struct _Component ...@@ -85,6 +85,7 @@ struct _Component
NiceAddress turn_server; /**< TURN server address */ NiceAddress turn_server; /**< TURN server address */
gchar *turn_username; /**< TURN username */ gchar *turn_username; /**< TURN username */
gchar *turn_password; /**< TURN password */ gchar *turn_password; /**< TURN password */
gboolean turn_long_term; /**< TURN long term credentials */
CandidatePair selected_pair; /**< independent from checklists, CandidatePair selected_pair; /**< independent from checklists,
see ICE 11.1. "Sending Media" (ID-19) */ see ICE 11.1. "Sending Media" (ID-19) */
gboolean media_after_tick; /**< true if media received since last gboolean media_after_tick; /**< true if media received since last
......
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