Skip to content

Commit

Permalink
[Added] support of EVEN-PORT + RESERVATION-TOKEN based negociation fo…
Browse files Browse the repository at this point in the history
…r STUN
  • Loading branch information
nicotyze committed Nov 22, 2024
1 parent e88aa4b commit 3cf66b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion modules/ice/ice.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ static int cand_gather_relayed(struct mnat_media *m, struct comp *comp,
err = turnc_alloc(&turnc, stun_conf(icem_stun(m->icem)),
IPPROTO_UDP, comp->sock, layer, &m->sess->srv,
username, password,
60, turnc_handler, comp);
60, NULL,
turnc_handler, comp);
if (err)
return err;

Expand Down
7 changes: 4 additions & 3 deletions modules/turn/turn.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ static void turn_handler(int err, uint16_t scode, const char *reason,
err = turnc_alloc(&other->turnc, NULL,
IPPROTO_UDP, other->sock, LAYER,
&m->sess->srv, m->sess->user, m->sess->pass,
TURN_DEFAULT_LIFETIME,
TURN_DEFAULT_LIFETIME, &token,
turn_handler, other);
}
else
Expand Down Expand Up @@ -250,7 +250,8 @@ static void tcp_estab_handler(void *arg)
err = turnc_alloc(&comp->turnc, NULL, IPPROTO_TCP, comp->tc, 0,
&m->sess->srv,
m->sess->user, m->sess->pass,
TURN_DEFAULT_LIFETIME, turn_handler, comp);
TURN_DEFAULT_LIFETIME, NULL,
turn_handler, comp);
if (err) {
m->sess->estabh(err, 0, NULL, m->sess->arg);
}
Expand Down Expand Up @@ -284,7 +285,7 @@ static int media_start(struct mnat_sess *sess, struct mnat_media *m)
err |= turnc_alloc(&comp->turnc, NULL,
IPPROTO_UDP, comp->sock, LAYER,
&sess->srv, sess->user, sess->pass,
TURN_DEFAULT_LIFETIME,
TURN_DEFAULT_LIFETIME, NULL,
turn_handler, comp);
break;

Expand Down

0 comments on commit 3cf66b7

Please sign in to comment.