]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Yield the thread and return -1 if the ioctl fails for Zaptel timing device.
authorMark Michelson <mmichelson@digium.com>
Fri, 8 Feb 2008 18:00:38 +0000 (18:00 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 8 Feb 2008 18:00:38 +0000 (18:00 +0000)
(closes issue #11891)
Reported by: tzafrir

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103070 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 00bdcea6477009b3fc61fa63ac3a5b559d328a83..90ad719946a52679f6a712ae8de4475b6f895494 100644 (file)
@@ -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 */