summaryrefslogtreecommitdiff
path: root/channels/chan_iax2.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2008-02-08 18:02:48 +0000
committerMark Michelson <mmichelson@digium.com>2008-02-08 18:02:48 +0000
commitb7764b534ab81585afbe23cc76c105b8415e8515 (patch)
treea648e24c1b181f3320747f515cf9e0beb89d8b66 /channels/chan_iax2.c
parent18347a73ff9c087697879fa8554249730df82b71 (diff)
Merged revisions 103070 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r103070 | mmichelson | 2008-02-08 12:00:38 -0600 (Fri, 08 Feb 2008) | 6 lines Yield the thread and return -1 if the ioctl fails for Zaptel timing device. (closes issue #11891) Reported by: tzafrir ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r--channels/chan_iax2.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index a8c29724a..c393711b9 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -6980,9 +6980,11 @@ static int timing_read(int *id, int fd, short events, void *cbdata)
if (events & AST_IO_PRI) {
#ifdef ZT_TIMERACK
/* Great, this is a timing interface, just call the ioctl */
- if (ioctl(fd, ZT_TIMERACK, &x))
- ast_log(LOG_WARNING, "Unable to acknowledge zap timer\n");
- res = 0;
+ if (ioctl(fd, ZT_TIMERACK, &x)) {
+ ast_log(LOG_WARNING, "Unable to acknowledge zap timer. IAX trunking will fail!\n");
+ usleep(1);
+ return -1;
+ }
#endif
} else {
/* Read and ignore from the pseudo channel for timing */