]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_timing: Don't close FD 0 when out of open files. 59/759/1
authorWalter Doekes <walter+asterisk@wjd.nu>
Thu, 2 Jul 2015 09:57:44 +0000 (11:57 +0200)
committerWalter Doekes <walter+asterisk@wjd.nu>
Thu, 2 Jul 2015 09:57:44 +0000 (11:57 +0200)
commitb090a8d40bba11920714ba625fa0ae1c9fc94560
tree06974fdd067a6e6497d90bdc28307d5bd40debdd
parent9b74dcb687f4e05da012d80ee54d04df82210520
res_timing: Don't close FD 0 when out of open files.

This fixes so a failure to get a timer file descriptor does not cascade
to closing FD 0.

On error, both res_timing_kqueue and res_timing_timerfd would call the
destructor before setting the file handle. The file handle had been
initialized to 0, causing FD 0 to be closed. This in turn, resulted in
floods of "CLI>" messages and an unusable terminal.

ASTERISK-19277 #close
Reported by: Barry Chern

Change-Id: I147d7e33726c6e5a2751928d56561494f5800350
res/res_timing_kqueue.c
res/res_timing_timerfd.c