aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorsruffell <sruffell@f38db490-d61c-443f-a65b-d21fe96a405b>2011-01-20 19:56:34 +0000
committersruffell <sruffell@f38db490-d61c-443f-a65b-d21fe96a405b>2011-01-20 19:56:34 +0000
commit1d0c3e21a3fb60c66c84869aa08e59d6ba267c4d (patch)
treefee533b819491c69f334c3d794ef69e81aca9065 /main
parent555e51079367175f07022016947cd7235d892092 (diff)
main/features: Use POLLPRI when waiting for events on parked channels.
This change resolves a regression in the 1.6.2 when converting from select to poll. The DAHDI timers use POLLPRI to indicate that the timer fired, but features was not waiting for that flag. The result was no audio for MOH when a call was parked and res_timing_dahdi was in use. This patch is slightly modified from the one on the mantis issue. It does not set an exception on the channel if the POLLPRI flag is set. (closes issue #18262) Reported by: francesco_r Patches: patch_park_moh-trunk-2.txt uploaded by cjacobsen (license 1029) Tested by: francesco_r, rfrantik, one47 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@303106 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/features.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/features.c b/main/features.c
index af06e9af7..e67c5fbd9 100644
--- a/main/features.c
+++ b/main/features.c
@@ -3489,7 +3489,7 @@ int manage_parkinglot(struct ast_parkinglot *curlot, const struct pollfd *pfds,
continue;
}
- if (!(pfds[y].revents & (POLLIN | POLLERR))) {
+ if (!(pfds[y].revents & (POLLIN | POLLERR | POLLPRI))) {
/* Next x */
continue;
}
@@ -3546,7 +3546,7 @@ std: for (x = 0; x < AST_MAX_FDS; x++) { /* mark fds for next round */
}
*new_pfds = tmp;
(*new_pfds)[*new_nfds].fd = chan->fds[x];
- (*new_pfds)[*new_nfds].events = POLLIN | POLLERR;
+ (*new_pfds)[*new_nfds].events = POLLIN | POLLERR | POLLPRI;
(*new_pfds)[*new_nfds].revents = 0;
(*new_nfds)++;
}