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

Friendly Automation asteriskteam at digium.com
Fri Jun 5 09:10:07 CDT 2020


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14492 )

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
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit



diff --git a/res/res_pjsip_logger.c b/res/res_pjsip_logger.c
index 8380bd6..957020f 100644
--- a/res/res_pjsip_logger.c
+++ b/res/res_pjsip_logger.c
@@ -286,7 +286,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/+/14492
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 17.5
Gerrit-Change-Id: I5b8253dd59a083a2ca2c81f232f1d14d33c6fd23
Gerrit-Change-Number: 14492
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/652da99b/attachment.html>


More information about the asterisk-code-review mailing list