Print log on successful send (#3942)

This commit is contained in:
Nanang Izzuddin 2024-05-07 09:22:35 +07:00 committed by GitHub
parent f406002f68
commit ca2dacf024
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 0 deletions

View File

@ -877,6 +877,12 @@ static void transport_send_callback(pjsip_transport *transport,
PJ_UNUSED_ARG(transport);
/* Print log on successful sending */
if (size > 0) {
PJ_LOG(5,(transport->obj_name,
"%s sent successfully", pjsip_tx_data_get_info(tdata)));
}
/* Mark pending off so that app can resend/reuse txdata from inside
* the callback.
*/
@ -965,6 +971,13 @@ PJ_DEF(pj_status_t) pjsip_transport_send( pjsip_transport *tr,
if (status != PJ_EPENDING) {
tdata->is_pending = 0;
/* Print log on successful sending */
if (status == PJ_SUCCESS) {
PJ_LOG(5,(tr->obj_name,
"%s sent successfully", pjsip_tx_data_get_info(tdata)));
}
pjsip_tx_data_dec_ref(tdata);
}