Skip to content

Commit

Permalink
Print log on successful send (#3942)
Browse files Browse the repository at this point in the history
  • Loading branch information
nanangizz committed May 7, 2024
1 parent f406002 commit ca2dacf
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pjsip/src/pjsip/sip_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit ca2dacf

Please sign in to comment.