]> 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:55 +0000 (06:59 -0500)
commit5bb6d2766ca18349a6763642dc56a8701e101143
treefb51fbe88d6b88b5931698682ac19fc03319c699
parentdc2baee0ee084880de59d174ea613c9e37111309
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