]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_logger.c: correct the return value checks when writing to pcap
authorPirmin Walthert <infos@nappsoft.ch>
Fri, 29 May 2020 09:28:57 +0000 (11:28 +0200)
committerJoshua Colp <jcolp@sangoma.com>
Mon, 1 Jun 2020 11:59:39 +0000 (06:59 -0500)
commit81b86702fbc793198ce1098a837a16a9583cdfda
tree5211f344a2f5e29c592ddbacf82478c69ba8efe2
parent07bf7890dcb0c9929ee5ac07e0b7320246c7cd91
res_pjsip_logger.c: correct the return value checks when writing to pcap
files

fwrite() does return the number of elements written and not the
number of bytes. However asterisk is currently comparing the return
value to the size of the written element what means that asterisk logs
five WARNING messages on every packet written to the pcap file.

This patch changes the code to check for the correct value, which will
always be 1.

ASTERISK-28921 #close

Change-Id: I2455032d9cb4c5a500692923f9e2a22e68b08fc2
res/res_pjsip_logger.c