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

Fix wrong check for end of ICE processing.

If the processing of the last check list finished before the processing of a previous check list the end of ICE processing was not notified to the application.
parent d86371cd
......@@ -2148,6 +2148,11 @@ static void ice_check_list_stop_retransmissions(const IceCheckList *cl)
ms_list_for_each(cl->check_list, (void (*)(void*))ice_pair_stop_retransmissions);
static int ice_find_running_check_list(const IceCheckList *cl)
return !(cl->state == ICL_Running);
static int ice_find_unsuccessful_check_list(IceCheckList *cl, const void *dummy)
return (cl->state == ICL_Completed);
......@@ -2160,7 +2165,7 @@ static void ice_continue_processing_on_next_check_list(IceCheckList *cl, RtpSess
ms_error("ice: Could not find check list in the session");
elem = ms_list_next(elem);
elem = ms_list_find(cl->session->streams, (void (*)(void*))ice_find_running_check_list);
if (elem == NULL) {
/* This was the last check list of the session. */
elem = ms_list_find_custom(cl->session->streams, (MSCompareFunc)ice_find_unsuccessful_check_list, NULL);
......@@ -2207,11 +2212,11 @@ static void ice_conclude_processing(IceCheckList *cl, RtpSession *rtp_session)
/* Initialise keepalive time. */
cl->keepalive_time = cl->session->ticker->time;
ice_continue_processing_on_next_check_list(cl, rtp_session);
/* Notify the application of the successful processing. */
ortp_event_get_data(ev)->info.ice_processing_successful = TRUE;
rtp_session_dispatch_event(rtp_session, ev);
ice_continue_processing_on_next_check_list(cl, rtp_session);
} else { = cl;
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