From b712f06fa3cb4454234ff62e1db02f75ff837a0b Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 27 Jul 2007 19:32:25 +0000 Subject: 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 --- fxotune.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'fxotune.c') 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 */ -- cgit v1.2.3