diff options
Diffstat (limited to 'res/res_timing_pthread.c')
-rw-r--r-- | res/res_timing_pthread.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/res/res_timing_pthread.c b/res/res_timing_pthread.c index 1e76720ec..f57c737f6 100644 --- a/res/res_timing_pthread.c +++ b/res/res_timing_pthread.c @@ -132,11 +132,9 @@ static void *pthread_timer_open(void) } for (i = 0; i < ARRAY_LEN(timer->pipe); ++i) { - int flags = fcntl(timer->pipe[i], F_GETFL); - flags |= O_NONBLOCK; - fcntl(timer->pipe[i], F_SETFL, flags); + ast_fd_set_flags(timer->pipe[i], O_NONBLOCK); } - + ao2_lock(pthread_timers); if (!ao2_container_count(pthread_timers)) { ast_mutex_lock(&timing_thread.lock); |