]> 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)
committernappsoft <infos@nappsoft.ch>
Fri, 29 May 2020 18:11:27 +0000 (13:11 -0500)
commitf444f2495bc2baa0ec5e43fc7f6d7655cf9383a7
tree8156fb1fb0c4c3cd49c393fa6ef2fe386b727366
parent2d14425e048af615cb5b13a21285be7fb2b905cd
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