From 2340dfeac15c9297ef4a7b6e2306debdef118ee6 Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Fri, 26 Mar 2010 15:08:54 +0000 Subject: [PATCH] Fix for ftdm_multiple_wait not reading proper file descriptors git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@1073 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/freetdm/src/ftdm_threadmutex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/freetdm/src/ftdm_threadmutex.c b/libs/freetdm/src/ftdm_threadmutex.c index 49cdb59cc1..34c802b1de 100644 --- a/libs/freetdm/src/ftdm_threadmutex.c +++ b/libs/freetdm/src/ftdm_threadmutex.c @@ -432,9 +432,9 @@ FT_DECLARE(ftdm_status_t) ftdm_interrupt_multiple_wait(ftdm_interrupt_t *interru return FTDM_TIMEOUT; } - for (i = size; i < ftdm_array_len(ints); i++) { + for (i = 0; i < size; i++) { if (ints[i].revents & POLLIN) { - res = read(ints[0].fd, pipebuf, sizeof(pipebuf)); + res = read(ints[i].fd, pipebuf, sizeof(pipebuf)); if (res == -1) { ftdm_log(FTDM_LOG_CRIT, "reading interrupt descriptor failed (%s)\n", strerror(errno)); }