Commit dc4c6204 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Include ice-ufrag and ice-pwd attributes in RE-INVITE.

parent cec1d35f
...@@ -170,6 +170,9 @@ static sdp_message_t *create_generic_sdp(const SalMediaDescription *desc, const ...@@ -170,6 +170,9 @@ static sdp_message_t *create_generic_sdp(const SalMediaDescription *desc, const
if ((ice_session != NULL) && (ice_session_check_list(ice_session, 0) != NULL)) { if ((ice_session != NULL) && (ice_session_check_list(ice_session, 0) != NULL)) {
char buffer[512]; char buffer[512];
switch (ice_session_state(ice_session)) { switch (ice_session_state(ice_session)) {
case IS_Completed:
sdp_message_a_attribute_add(local, -1, osip_strdup("nortpproxy"), osip_strdup("yes"));
/* No break to also include the ice-ufrag and ice-pwd attributes when ICE session is completed. */
case IS_Running: case IS_Running:
case IS_Stopped: case IS_Stopped:
snprintf(buffer, sizeof(buffer), "%s", ice_session_local_pwd(ice_session)); snprintf(buffer, sizeof(buffer), "%s", ice_session_local_pwd(ice_session));
...@@ -177,9 +180,6 @@ static sdp_message_t *create_generic_sdp(const SalMediaDescription *desc, const ...@@ -177,9 +180,6 @@ static sdp_message_t *create_generic_sdp(const SalMediaDescription *desc, const
snprintf(buffer, sizeof(buffer), "%s", ice_session_local_ufrag(ice_session)); snprintf(buffer, sizeof(buffer), "%s", ice_session_local_ufrag(ice_session));
sdp_message_a_attribute_add(local, -1, osip_strdup("ice-ufrag"), osip_strdup(buffer)); sdp_message_a_attribute_add(local, -1, osip_strdup("ice-ufrag"), osip_strdup(buffer));
break; break;
case IS_Completed:
sdp_message_a_attribute_add(local, -1, osip_strdup("nortpproxy"), osip_strdup("yes"));
break;
default: default:
break; break;
} }
......
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