aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-11-08 21:59:45 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-11-08 21:59:45 +0000
commitfb8bf2401f36a960395a6d042c5b628492212207 (patch)
tree6a2a98c6735594eb33c87e844fc026a479577fc5 /main
parentd57d481b760c9e51bb405c86ec098346aa166cdf (diff)
Merged revisions 294277 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r294277 | jpeeler | 2010-11-08 15:58:13 -0600 (Mon, 08 Nov 2010) | 16 lines Fix playback failure when using IAX with the timerfd module. To fix this issue the alert pipe will now be used when the timerfd module is in use. There appeared to be a race that was not solved by adding locking in the timerfd module, but needed to be there anyway. The race was between the timer being put in non-continuous mode in ast_read on the channel thread and the IAX frame scheduler queuing a frame which would enable continuous mode before the non-continuous mode event was read. This race for now is simply avoided. (closes issue #18110) Reported by: tpanton Tested by: tpanton I put tested by tpanton because it was tested on his hardware. Thanks for the remote access to debug this issue! ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@294278 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/channel.c4
-rw-r--r--main/timing.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c
index daf5b7a8e..7c1e998af 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -1129,7 +1129,9 @@ __ast_channel_alloc_ap(int needqueue, int state, const char *cid_num, const char
}
if ((tmp->timer = ast_timer_open())) {
- needqueue = 0;
+ if (strcmp(ast_timer_get_name(tmp->timer), "timerfd")) {
+ needqueue = 0;
+ }
tmp->timingfd = ast_timer_fd(tmp->timer);
}
diff --git a/main/timing.c b/main/timing.c
index d15024b32..23d3cf8ee 100644
--- a/main/timing.c
+++ b/main/timing.c
@@ -205,6 +205,11 @@ unsigned int ast_timer_get_max_rate(const struct ast_timer *handle)
return res;
}
+const char *ast_timer_get_name(const struct ast_timer *handle)
+{
+ return handle->holder->iface->name;
+}
+
static char *timing_test(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
struct ast_timer *timer;