Commit 3d4cdee1 authored by Olivier Crête's avatar Olivier Crête 👻 Committed by Olivier Crête

agent: Check for early checks on dribbled candidates too

We have to check this list every time candidates are added.
parent f97f1072
......@@ -3616,6 +3616,7 @@ _set_remote_candidates_locked (NiceAgent *agent, NiceStream *stream,
}
if (added > 0) {
conn_check_remote_candidates_set(agent, stream, component);
conn_check_schedule_next (agent);
}
......
......@@ -1630,22 +1630,12 @@ gint conn_check_compare (const CandidateCheckPair *a, const CandidateCheckPair *
return 0;
}
/*
* Handle any processing steps for connectivity checks after
* remote credentials have been set. This function handles
* the special case where answerer has sent us connectivity
* checks before the answer (containing credentials information),
* reaches us. The special case is documented in sect 7.2
* if ICE spec (ID-19).
*/
void conn_check_remote_credentials_set(NiceAgent *agent, NiceStream *stream)
void
conn_check_remote_candidates_set(NiceAgent *agent, NiceStream *stream,
NiceComponent *component)
{
GSList *j, *l, *m;
GSList *l, *m;
GList *k;
IncomingCheck *c;
for (j = stream->components; j ; j = j->next) {
NiceComponent *component = j->data;
for (k = component->incoming_checks.head; k;) {
IncomingCheck *icheck = k->data;
......@@ -1680,6 +1670,24 @@ void conn_check_remote_credentials_set(NiceAgent *agent, NiceStream *stream)
}
k = k_next;
}
}
/*
* Handle any processing steps for connectivity checks after
* remote credentials have been set. This function handles
* the special case where answerer has sent us connectivity
* checks before the answer (containing credentials information),
* reaches us. The special case is documented in RFC 5245 sect 7.2.
* ).
*/
void conn_check_remote_credentials_set(NiceAgent *agent, NiceStream *stream)
{
GSList *j;
for (j = stream->components; j ; j = j->next) {
NiceComponent *component = j->data;
conn_check_remote_candidates_set(agent, stream, component);
}
}
......
......@@ -111,6 +111,7 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair);
void conn_check_prune_stream (NiceAgent *agent, NiceStream *stream);
gboolean conn_check_handle_inbound_stun (NiceAgent *agent, NiceStream *stream, NiceComponent *component, NiceSocket *udp_socket, const NiceAddress *from, gchar *buf, guint len);
gint conn_check_compare (const CandidateCheckPair *a, const CandidateCheckPair *b);
void conn_check_remote_candidates_set(NiceAgent *agent, NiceStream *stream, NiceComponent *component);
void conn_check_remote_credentials_set(NiceAgent *agent, NiceStream *stream);
NiceCandidateTransport conn_check_match_transport (NiceCandidateTransport transport);
void
......
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