Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ice: fix checklist #156

Merged
merged 1 commit into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/ice/chklist.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static int candpairs_form(struct icem *icem)
return ENOENT;

if (list_isempty(&icem->rcandl)) {
DEBUG_WARNING("%s: no remote candidates\n", icem->name);
DEBUG_WARNING("form: '%s' no remote candidates\n", icem->name);
return ENOENT;
}

Expand Down Expand Up @@ -163,9 +163,6 @@ int icem_checklist_form(struct icem *icem)
if (!icem)
return EINVAL;

if (!list_isempty(&icem->checkl))
return EALREADY;

/* 1. form candidate pairs */
err = candpairs_form(icem);
if (err)
Expand Down
19 changes: 16 additions & 3 deletions src/ice/connchk.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,27 @@ static void stunc_resp_handler(int err, uint16_t scode, const char *reason,

int icem_conncheck_send(struct ice_candpair *cp, bool use_cand, bool trigged)
{
struct ice_cand *lcand = cp->lcand;
struct icem *icem = cp->icem;
struct ice_cand *lcand;
struct icem *icem;
char username_buf[64];
size_t presz = 0;
uint32_t prio_prflx;
uint16_t ctrl_attr;
int err = 0;

if (!cp)
return EINVAL;

lcand = cp->lcand;
icem = cp->icem;

if (!str_isset(icem->rufrag)) {
DEBUG_WARNING("send: name='%s' no remote ufrag"
" [use=%d, trig=%d]\n",
icem->name, use_cand, trigged);
return EPROTO;
}

icem_candpair_set_state(cp, ICE_CANDPAIR_INPROGRESS);

(void)re_snprintf(username_buf, sizeof(username_buf),
Expand Down Expand Up @@ -258,7 +271,7 @@ int icem_conncheck_send(struct ice_candpair *cp, bool use_cand, bool trigged)

/* The password is equal to the password provided by the peer */
if (!icem->rpwd) {
DEBUG_WARNING("no remote password!\n");
DEBUG_WARNING("send: no remote password!\n");
}

if (cp->ct_conn) {
Expand Down