From ca2dacf0247a0baed4173051d5d1606100c9f7f6 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Tue, 7 May 2024 09:22:35 +0700 Subject: [PATCH] Print log on successful send (#3942) --- pjsip/src/pjsip/sip_transport.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pjsip/src/pjsip/sip_transport.c b/pjsip/src/pjsip/sip_transport.c index 3b30046fec..27c8176093 100644 --- a/pjsip/src/pjsip/sip_transport.c +++ b/pjsip/src/pjsip/sip_transport.c @@ -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); }