Transaction only decrements tx_data in send_msg() if return status is PJ_SUCCESS
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@115 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
30a48c61f7
commit
f6167441b4
2 changed files with 8 additions and 5 deletions
|
@ -190,11 +190,12 @@ PJ_DECL(pj_status_t) pjsip_tsx_create_uas( pjsip_module *tsx_user,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transmit message in tdata with this transaction. It is possible to
|
* Transmit message in tdata with this transaction. It is possible to
|
||||||
* pass NULL in tdata for UAC transaction, which in this case the last message
|
* pass NULL in tdata for UAC transaction, which in this case the last
|
||||||
* or the request message which was specified in #pjsip_tsx_create_uac()
|
* message transmitted, or the request message which was specified when
|
||||||
* will be sent.
|
* calling #pjsip_tsx_create_uac(), will be sent.
|
||||||
*
|
*
|
||||||
* This function decrements the reference counter of the transmit buffer.
|
* This function decrements the reference counter of the transmit buffer
|
||||||
|
* only when it returns PJ_SUCCESS;
|
||||||
*
|
*
|
||||||
* @param tsx The transaction.
|
* @param tsx The transaction.
|
||||||
* @param tdata The outgoing message. If NULL is specified, then the
|
* @param tdata The outgoing message. If NULL is specified, then the
|
||||||
|
|
|
@ -1226,7 +1226,9 @@ PJ_DEF(pj_status_t) pjsip_tsx_send_msg( pjsip_transaction *tsx,
|
||||||
/* Will always decrement tdata reference counter
|
/* Will always decrement tdata reference counter
|
||||||
* (consistent with other send functions.
|
* (consistent with other send functions.
|
||||||
*/
|
*/
|
||||||
pjsip_tx_data_dec_ref(tdata);
|
if (status == PJ_SUCCESS) {
|
||||||
|
pjsip_tx_data_dec_ref(tdata);
|
||||||
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue