Commit 33411cef authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Do not try to process received STUN packets if there is no ICE session.

parent 8a7e4bc6
......@@ -1186,6 +1186,8 @@ void ice_handle_stun_packet(IceCheckList *cl, RtpSession *rtp_session, OrtpEvent
int recvport;
bool_t res;
if (cl->session == NULL) return;
memset(&msg, 0, sizeof(msg));
res = stunParseMessage((char *) mp->b_rptr, mp->b_wptr - mp->b_rptr, &msg);
if (res == FALSE) {
......@@ -1767,9 +1769,12 @@ void ice_check_list_process(IceCheckList *cl, RtpSession *rtp_session)
IceCandidatePairState state;
IceCandidatePair *pair;
MSList *elem;
uint64_t curtime = cl->session->ticker->time;
uint64_t curtime;
bool_t retransmissions_pending = FALSE;
if (cl->session == NULL) return;
curtime = cl->session->ticker->time;
switch (cl->state) {
case ICL_Completed:
/* Handle keepalive. */
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