diff options
author | Benny Prijono <bennylp@teluu.com> | 2011-06-22 10:57:11 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2011-06-22 10:57:11 +0000 |
commit | 5dbdaca9f7afbfd8158aabf275bf9db3308e542b (patch) | |
tree | f3f8d20105f6926db89c926eebcffb71b8bca9d0 /pjnath | |
parent | b7229ba3b5639e04706081fb57e34b05e0876883 (diff) |
Fixed #1316: Assertion when TURN session is deallocated prematurely (thanks Tony Jago Million for the report)
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3596 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjnath')
-rw-r--r-- | pjnath/src/pjnath/ice_strans.c | 6 | ||||
-rw-r--r-- | pjnath/src/pjnath/turn_sock.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/pjnath/src/pjnath/ice_strans.c b/pjnath/src/pjnath/ice_strans.c index eb3d00ba..f5acfdb6 100644 --- a/pjnath/src/pjnath/ice_strans.c +++ b/pjnath/src/pjnath/ice_strans.c @@ -1184,6 +1184,12 @@ PJ_DEF(pj_status_t) pj_ice_strans_sendto( pj_ice_strans *ice_st, PJ_STUN_SESS_LOG_RX_IND) }; + /* https://trac.pjsip.org/repos/ticket/1316 */ + if (comp->turn_sock == NULL) { + /* TURN socket error */ + return PJ_EINVALIDOP; + } + if (!comp->turn_log_off) { /* Disable logging for Send/Data indications */ PJ_LOG(5,(ice_st->obj_name, diff --git a/pjnath/src/pjnath/turn_sock.c b/pjnath/src/pjnath/turn_sock.c index 570b197b..e841af2c 100644 --- a/pjnath/src/pjnath/turn_sock.c +++ b/pjnath/src/pjnath/turn_sock.c @@ -619,7 +619,8 @@ static pj_status_t turn_on_send_pkt(pj_turn_session *sess, if (turn_sock == NULL) { /* We've been destroyed */ - pj_assert(!"We should shutdown gracefully"); + // https://trac.pjsip.org/repos/ticket/1316 + //pj_assert(!"We should shutdown gracefully"); return PJ_EINVALIDOP; } |