openbsd-ports/telephony/asterisk/patches/patch-pbx_pbx_spool_c
sthen c38a08495b bugfix update to Asterisk 10.11.0
- while there, revise pbx_spool.c kevent timeout fix; rather than
clamping the timestamp, in the particular problem situation we hit
the loop (where dirlist is empty), pass in NULL rather than
INT_MAX-timenow similar to what's done in the inotify case.
2012-12-11 14:46:41 +00:00

17 lines
672 B
Plaintext

$OpenBSD: patch-pbx_pbx_spool_c,v 1.3 2012/12/11 14:46:41 sthen Exp $
Don't pass an invalid time limit to kevent() if the directory list is empty
(limit is 100M seconds; see itimerfix() in /sys/kern/kern_time.c).
--- pbx/pbx_spool.c.orig Mon Oct 8 22:11:41 2012
+++ pbx/pbx_spool.c Tue Dec 11 14:34:03 2012
@@ -742,7 +742,7 @@ static void *scan_thread(void *unused)
queue_created_files();
#else
struct timespec ts2 = { next - now, 0 };
- if (kevent(inotify_fd, NULL, 0, &kev, 1, &ts2) <= 0) {
+ if (kevent(inotify_fd, NULL, 0, &kev, 1, next == INT_MAX ? NULL : &ts2) <= 0) {
/* Interrupt or timeout, restart calculations */
continue;
} else {