From: Russell Bryant Date: Tue, 7 Aug 2007 17:44:04 +0000 (+0000) Subject: Revert patch committed for issue #9660. It broke E&M trunks. X-Git-Tag: 1.2.24~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0edee75c07d208f4924ab62eccbdaf06629841db;p=thirdparty%2Fasterisk.git Revert patch committed for issue #9660. It broke E&M trunks. (closes issue #10360) (closes issue #10364) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@78370 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_zap.c b/channels/chan_zap.c index b61a9c28c4..8589de4323 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -1726,20 +1726,14 @@ static int restore_gains(struct zt_pvt *p) static inline int zt_set_hook(int fd, int hs) { - int x, res, count = 0; + int x, res; x = hs; res = ioctl(fd, ZT_HOOK, &x); - while (res < 0 && count < 20) { - usleep(100000); /* 1/10 sec. */ - x = hs; - res = ioctl(fd, ZT_HOOK, &x); - count++; - } - if (res < 0) { - if (errno == EINPROGRESS) return 0; + if (errno == EINPROGRESS) + return 0; ast_log(LOG_WARNING, "zt hook failed: %s\n", strerror(errno)); }