utils: Add convenience function for setting fd flags
authorSean Bright <sean.bright@gmail.com>
Thu, 7 Dec 2017 15:52:39 +0000 (10:52 -0500)
committerSean Bright <sean.bright@gmail.com>
Fri, 8 Dec 2017 19:28:04 +0000 (13:28 -0600)
commit2ffe52a116ad05d060cbedda93c48cf5a4415ca3
tree9f8d99288f532ad213b8681e7616c26e8535df24
parentb0b28446c1e5f76c54b823bc3f4e2a5423c9c79b
utils: Add convenience function for setting fd flags

There are many places in the code base where we ignore the return value
of fcntl() when getting/setting file descriptior flags. This patch
introduces a convenience function that allows setting or clearing file
descriptor flags and will also log an error on failure for later
analysis.

Change-Id: I8b81901e1b1bd537ca632567cdb408931c6eded7
17 files changed:
apps/app_ices.c
channels/chan_phone.c
channels/vgrabbers.c
codecs/codec_dahdi.c
include/asterisk/utils.h
main/alertpipe.c
main/asterisk.c
main/iostream.c
main/tcptls.c
main/udptl.c
main/utils.c
res/res_agi.c
res/res_http_websocket.c
res/res_musiconhold.c
res/res_pktccops.c
res/res_rtp_asterisk.c
res/res_timing_pthread.c