SIP TCP and TLS transports may call send completion callback with bytes_set=0 when send operation fails because outgoing connection is cancelled (for example, application quits). This will trigger assertion error in transaction because transaction only expects positive or negative bytes_set number, but not zero
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1551 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
42307c7b79
commit
8dbd8637e8
|
@ -1078,6 +1078,9 @@ static void on_write_complete(pj_ioqueue_key_t *key,
|
||||||
/*
|
/*
|
||||||
* Notify sip_transport.c that packet has been sent.
|
* Notify sip_transport.c that packet has been sent.
|
||||||
*/
|
*/
|
||||||
|
if (bytes_sent == 0)
|
||||||
|
bytes_sent = -PJ_RETURN_OS_ERROR(OSERR_ENOTCONN);
|
||||||
|
|
||||||
tdata_op_key->callback(&tcp->base, tdata_op_key->token, bytes_sent);
|
tdata_op_key->callback(&tcp->base, tdata_op_key->token, bytes_sent);
|
||||||
|
|
||||||
/* Mark last activity time */
|
/* Mark last activity time */
|
||||||
|
|
Loading…
Reference in New Issue