Commit bf9d7082 authored by Ghislain MARY's avatar Ghislain MARY

Add ice_check_list_set_remote_credentials() to the ICE API.

parent ac437f66
......@@ -286,7 +286,7 @@ MS2_PUBLIC void ice_session_set_role(IceSession *session, IceRole role);
* This function SHOULD not be used. However, it is used by mediastream for testing purpose to
* apply the same credentials for local and remote agents because the SDP exchange is bypassed.
*/
MS2_PUBLIC void ice_session_set_local_credentials(IceSession *session, const char *ufrag, const char *pwd);
void ice_session_set_local_credentials(IceSession *session, const char *ufrag, const char *pwd);
/**
* Set the remote credentials of an ICE session.
......@@ -368,6 +368,17 @@ MS2_PUBLIC const char * ice_check_list_remote_ufrag(IceCheckList *cl);
*/
MS2_PUBLIC const char * ice_check_list_remote_pwd(IceCheckList *cl);
/**
* Set the remote credentials of an ICE check list.
*
* @param cl A pointer to a check list
* @param ufrag The remote username fragment
* @param pwd The remote password
*
* This function is to be called once the remote credentials have been received via SDP.
*/
MS2_PUBLIC void ice_check_list_set_remote_credentials(IceCheckList *cl, const char *ufrag, const char *pwd);
/**
* Get the default local candidate for an ICE check list.
*
......
......@@ -372,6 +372,11 @@ static int ice_find_default_local_candidate(IceCandidate *candidate, void *dummy
return !((candidate->componentID == 1) && (candidate->is_default == TRUE));
}
void ice_check_list_set_remote_credentials(IceCheckList *cl, const char *ufrag, const char *pwd)
{
ice_set_credentials(&cl->remote_ufrag, &cl->remote_pwd, ufrag, pwd);
}
const IceCandidate * ice_check_list_default_local_candidate(IceCheckList *cl)
{
IceCandidate *candidate = NULL;
......@@ -382,11 +387,6 @@ const IceCandidate * ice_check_list_default_local_candidate(IceCheckList *cl)
return candidate;
}
void ice_check_list_set_remote_credentials(IceCheckList *cl, const char *ufrag, const char *pwd)
{
ice_set_credentials(&cl->remote_ufrag, &cl->remote_pwd, ufrag, pwd);
}
static void ice_check_list_queue_triggered_check(IceCheckList *cl, IceCandidatePair *pair)
{
MSList *elem = ms_list_find(cl->triggered_checks_queue, pair);
......
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