]> 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 12:06:13 +0000 (07:06 -0500)
commit4075ae5957012e794943c40b6c137d2ec1a379b8
tree5fda728a934c6f134e3ba0eace00f7a18aec1d7f
parentd00cf806ee493364b7323594be03edeb89f9fd8e
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