fix ice parsing

This commit is contained in:
Jehan Monnier 2014-12-11 08:35:42 +01:00
parent 8637eacae5
commit 94b4002cbf
3 changed files with 7 additions and 6 deletions

View file

@ -489,10 +489,11 @@ static void sdp_parse_media_ice_parameters(belle_sdp_media_description_t *media_
if ((keywordcmp("candidate", att_name) == 0) && (value != NULL)) {
SalIceCandidate *candidate = &stream->ice_candidates[nb_ice_candidates];
int nb = sscanf(value, "%s %u UDP %u %s %d typ %s raddr %s rport %d",
candidate->foundation, &candidate->componentID, &candidate->priority, candidate->addr, &candidate->port,
char proto[4];
int nb = sscanf(value, "%s %u %3s %u %s %d typ %s raddr %s rport %d",
candidate->foundation, &candidate->componentID, proto, &candidate->priority, candidate->addr, &candidate->port,
candidate->type, candidate->raddr, &candidate->rport);
if ((nb == 6) || (nb == 8)) nb_ice_candidates++;
if (strcasecmp("udp",proto)==0 && ((nb == 7) || (nb == 9))) nb_ice_candidates++;
else memset(candidate, 0, sizeof(*candidate));
} else if ((keywordcmp("remote-candidates", att_name) == 0) && (value != NULL)) {
SalIceRemoteCandidate candidate;

View file

@ -896,8 +896,8 @@ void linphone_call_update_ice_from_remote_media_description(LinphoneCall *call,
if (cl && (stream->ice_pwd[0] != '\0') && (stream->ice_ufrag[0] != '\0')) {
if (ice_check_list_remote_credentials_changed(cl, stream->ice_ufrag, stream->ice_pwd)) {
if (ice_restarted == FALSE
&& ice_check_list_remote_ufrag(cl)
&& ice_check_list_remote_pwd(cl)) {
&& ice_check_list_get_remote_ufrag(cl)
&& ice_check_list_get_remote_pwd(cl)) {
/* restart onlu if remote ufrag/paswd was already set*/
ice_session_restart(call->ice_session);
ice_restarted = TRUE;

@ -1 +1 @@
Subproject commit 6ef87545afabc2f66e28b1092bc490cbe7a994c3
Subproject commit 4b87cdd23ca14e9b39212b73f0a545d4f89a9d56