Skip to content

Commit

Permalink
Split logging to keep Warning regarding dropped packet at level 1 whi…
Browse files Browse the repository at this point in the history
…le moving the packet contents to 4 (pjsip#3476)
  • Loading branch information
mbradeen committed Jul 18, 2023
1 parent c5d7e43 commit 1c22b22
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pjsip/src/pjsip/sip_transport.c
Expand Up @@ -2103,15 +2103,17 @@ PJ_DEF(pj_ssize_t) pjsip_tpmgr_receive_packet( pjsip_tpmgr *mgr,
* which were sent to keep NAT bindings.
*/
if (tmp.slen) {
PJ_LOG(4, (THIS_FILE,
"Dropping %ld bytes packet from %s %s:%d %.*s:\n"
"%.*s\n"
"-- end of packet.",
PJ_LOG(2, (THIS_FILE,
"Dropping %d bytes packet from %s %s:%d %.*s\n",
msg_fragment_size,
rdata->tp_info.transport->type_name,
rdata->pkt_info.src_name,
rdata->pkt_info.src_name,
rdata->pkt_info.src_port,
(int)tmp.slen, tmp.ptr,
(int)tmp.slen, tmp.ptr));
PJ_LOG(4, (THIS_FILE,
"Dropped packet:"
"%.*s\n"
"-- end of packet.",
(int)msg_fragment_size,
rdata->msg_info.msg_buf));
}
Expand Down

0 comments on commit 1c22b22

Please sign in to comment.