summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */