From c8c9ef1cd2d0abc54f76a0ed4e035027ff5e8075 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 25 Jan 2016 17:13:03 +0100 Subject: [PATCH] specify role immediately when asking for an ice restart. --- include/mediastreamer2/ice.h | 4 ++-- src/voip/ice.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/mediastreamer2/ice.h b/include/mediastreamer2/ice.h index b16a1e14..74cb6d99 100644 --- a/include/mediastreamer2/ice.h +++ b/include/mediastreamer2/ice.h @@ -331,7 +331,7 @@ MS2_PUBLIC const char * ice_session_remote_pwd(const IceSession *session); MS2_PUBLIC IceSessionState ice_session_state(const IceSession *session); /** - * Gte the role of the agent for an ICE session. + * Get the role of the agent for an ICE session. * * @param session A pointer to a session * @return The role of the agent for the session @@ -502,7 +502,7 @@ MS2_PUBLIC void ice_session_select_candidates(IceSession *session); * * @param session A pointer to a session */ -MS2_PUBLIC void ice_session_restart(IceSession *session); +MS2_PUBLIC void ice_session_restart(IceSession *session, IceRole role); /** * Get the state of an ICE check list. diff --git a/src/voip/ice.c b/src/voip/ice.c index b3b4f99e..ee2fa906 100644 --- a/src/voip/ice.c +++ b/src/voip/ice.c @@ -3109,8 +3109,7 @@ static void ice_check_list_restart(IceCheckList *cl) memset(&cl->nomination_delay_start_time, 0, sizeof(cl->nomination_delay_start_time)); } -void ice_session_restart(IceSession *session) -{ +void ice_session_restart(IceSession *session, IceRole role){ int i; ms_warning("ICE session restart"); @@ -3132,6 +3131,7 @@ void ice_session_restart(IceSession *session) if (session->streams[i] != NULL) ice_check_list_restart(session->streams[i]); } + ice_session_set_role(session, role); } -- GitLab