aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_iax2.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-08 18:00:38 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-08 18:00:38 +0000
commit52bfc9d6f67aff332be439bfe6361b98e4e12cf5 (patch)
tree3399e0603139e6e9dcc8fe35b48cc6d276058a98 /channels/chan_iax2.c
parent96ece3df54b9d4c548486bf6d4aaaeadb5f82038 (diff)
Yield the thread and return -1 if the ioctl fails for Zaptel timing device.
(closes issue #11891) Reported by: tzafrir git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103070 f38db490-d61c-443f-a65b-d21fe96a405b
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 00bdcea64..90ad71994 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -6360,9 +6360,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 */