summaryrefslogtreecommitdiff
path: root/fxotune.c
diff options
context:
space:
mode:
authormattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-07-27 19:32:25 +0000
committermattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-07-27 19:32:25 +0000
commitb712f06fa3cb4454234ff62e1db02f75ff837a0b (patch)
tree13a2c7ebc87e6258419755f8bf2b97ced2a8f3e7 /fxotune.c
parent7e67a7f820d47dee9c2c302962732a6fa814ac1e (diff)
Quick fix for could not fill input buffer errors
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2786 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'fxotune.c')
-rw-r--r--fxotune.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fxotune.c b/fxotune.c
index c5db4d1..f623b81 100644
--- a/fxotune.c
+++ b/fxotune.c
@@ -231,11 +231,15 @@ static int acim_tune(int whichzap, char *dialstr)
return -1;
}
+retry:
/* read return response */
res = read(whichzap, inbuf, BUFFER_LENGTH);
if (res != BUFFER_LENGTH) {
- fprintf(stderr, "Could not fill input buffer\n");
- return -1;
+ int x;
+
+ ioctl(whichzap, ZT_GETEVENT, &x);
+ goto retry;
+
}
/* calculate power of response */