summaryrefslogtreecommitdiff
path: root/pjnath
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2013-02-21 21:53:28 +0000
committerBenny Prijono <bennylp@teluu.com>2013-02-21 21:53:28 +0000
commit637e035134e4e04d1ede0b2927100c0617455f93 (patch)
tree7a1dba418ca92f6cd0512dbdbaa72511cef04872 /pjnath
parentc1fac09695b25a676f33024cde2a8d956bb4166e (diff)
Re #1617: prevent TURN session from sending anything once it is in deallocating state
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4368 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjnath')
-rw-r--r--pjnath/src/pjnath/turn_session.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pjnath/src/pjnath/turn_session.c b/pjnath/src/pjnath/turn_session.c
index e783912b..536634c4 100644
--- a/pjnath/src/pjnath/turn_session.c
+++ b/pjnath/src/pjnath/turn_session.c
@@ -1955,6 +1955,11 @@ static void on_timer_event(pj_timer_heap_t *th, pj_timer_entry *e)
pj_bool_t resched = PJ_TRUE;
pj_bool_t pkt_sent = PJ_FALSE;
+ if (sess->state >= PJ_TURN_STATE_DEALLOCATING) {
+ /* Ignore if we're deallocating */
+ goto on_return;
+ }
+
pj_gettimeofday(&now);
/* Refresh allocation if it's time to do so */
@@ -2033,6 +2038,7 @@ static void on_timer_event(pj_timer_heap_t *th, pj_timer_entry *e)
pj_assert(!"Unknown timer event");
}
+on_return:
pj_grp_lock_release(sess->grp_lock);
}