diff options
author | Benny Prijono <bennylp@teluu.com> | 2012-06-14 09:04:20 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2012-06-14 09:04:20 +0000 |
commit | 4713c8b2703bb8e8ee021e4677be2b0983b5afef (patch) | |
tree | 2299fdde1c02b50b1ef3035be8526fdf2fe6e185 | |
parent | 110117d73d7d0374f26a1336eee196692a7fe182 (diff) |
Fixed #1535: Pending outgoing TCP transmission may cause crash if the library is shutdown
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4165 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip/src/pjsip/sip_transaction.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pjsip/src/pjsip/sip_transaction.c b/pjsip/src/pjsip/sip_transaction.c index 0ef1f4d2..3560b775 100644 --- a/pjsip/src/pjsip/sip_transaction.c +++ b/pjsip/src/pjsip/sip_transaction.c @@ -1737,8 +1737,12 @@ static void send_msg_callback( pjsip_send_state *send_state, /* Check if transaction has cancelled itself from this transmit * notification (https://trac.pjsip.org/repos/ticket/1033). + * Also check if the transaction layer itself may have been shutdown + * (https://trac.pjsip.org/repos/ticket/1535) */ - if (tdata->mod_data[mod_tsx_layer.mod.id] == NULL) { + if (mod_tsx_layer.mod.id < 0 || + tdata->mod_data[mod_tsx_layer.mod.id] == NULL) + { *cont = PJ_FALSE; return; } |