[Asterisk-code-review] res_pjsip_logger: use the correct pointer when logging tx_messages to... (asterisk[13.34])

Joshua Colp asteriskteam at digium.com
Fri Jun 5 09:21:03 CDT 2020


Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14490 )

Change subject: res_pjsip_logger: use the correct pointer when logging tx_messages to pcap
......................................................................

res_pjsip_logger: use the correct pointer when logging tx_messages to pcap

When writing tx messages to pcap files, Asterisk is using the wrong
pointer resulting in lots of wasted space. This patch fixes it to use
the correct pointer.

ASTERISK-28932 #close

Change-Id: I5b8253dd59a083a2ca2c81f232f1d14d33c6fd23
---
M res/res_pjsip_logger.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
  George Joseph: Looks good to me, approved



diff --git a/res/res_pjsip_logger.c b/res/res_pjsip_logger.c
index 3762134..caa8841 100644
--- a/res/res_pjsip_logger.c
+++ b/res/res_pjsip_logger.c
@@ -313,7 +313,7 @@
 	}
 
 	if (default_logger->log_to_pcap) {
-		pjsip_logger_write_to_pcap(default_logger, tdata->buf.start, (int) (tdata->buf.end - tdata->buf.start),
+		pjsip_logger_write_to_pcap(default_logger, tdata->buf.start, (int) (tdata->buf.cur - tdata->buf.start),
 			NULL, &tdata->tp_info.dst_addr);
 	}
 

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14490
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13.34
Gerrit-Change-Id: I5b8253dd59a083a2ca2c81f232f1d14d33c6fd23
Gerrit-Change-Number: 14490
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: nappsoft <infos at nappsoft.ch>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200605/314a2ca6/attachment.html>


More information about the asterisk-code-review mailing list