Пример #1
0
/* 8.  Concluding ICE Processing */
static void concluding_ice(struct icem_comp *comp)
{
	struct candpair *cp;

	if (!comp || comp->concluded)
		return;

	/* pick the best candidate pair, highest priority */
	cp = icem_candpair_find_st(&comp->icem->validl, comp->id,
				   CANDPAIR_SUCCEEDED);
	if (!cp) {
		DEBUG_WARNING("{%s.%u} conclude: no valid candpair found"
			      " (validlist=%u)\n",
			      comp->icem->name, comp->id,
			      list_count(&comp->icem->validl));
		return;
	}

	icem_comp_set_selected(comp, cp);

	if (comp->icem->ice->conf.nom == ICE_NOMINATION_REGULAR) {

		/* send STUN request with USE_CAND flag via triggered qeueue */
		(void)icem_conncheck_send(cp, true, true);
		icem_conncheck_schedule_check(comp->icem);
	}

	comp->concluded = true;
}
Пример #2
0
static void pace_next(struct icem *icem)
{
	if (icem->state != ICE_CHECKLIST_RUNNING)
		return;

	icem_conncheck_schedule_check(icem);

	if (icem->state == ICE_CHECKLIST_FAILED)
		return;

	icem_checklist_update(icem);
}