Пример #1
0
static void call_gather_handler(int err, struct icem *icem, uint16_t scode,
				const char *reason)
{
	struct le *le;

	/* No more pending requests? */
	if (icem->nstun != 0)
		return;

	if (!icem->gh)
		return;

	if (err)
		goto out;

	icem_cand_redund_elim(icem);

	for (le = icem->compl.head; le; le = le->next) {

		struct icem_comp *comp = le->data;

		err |= icem_comp_set_default_cand(comp);
	}

 out:
	icem->gh(err, scode, reason, icem->arg);

	icem->gh = NULL;
}
Пример #2
0
int icem_comps_set_default_cand(struct icem *icem)
{
	struct le *le;
	int err = 0;

	if (!icem)
		return EINVAL;

	for (le = icem->compl.head; le; le = le->next) {

		struct icem_comp *comp = le->data;

		err |= icem_comp_set_default_cand(comp);
	}

	return err;
}
Пример #3
0
/**
 * Set the default local candidates, for ICE-lite mode only
 *
 * @param icem ICE Media object
 *
 * @return 0 if success, otherwise errorcode
 */
int icem_lite_set_default_candidates(struct icem *icem)
{
	struct le *le;
	int err = 0;

	if (icem->lmode != ICE_MODE_LITE)
		return EINVAL;

	for (le = icem->compl.head; le; le = le->next) {

		struct icem_comp *comp = le->data;

		err |= icem_comp_set_default_cand(comp);
	}

	return err;
}