[zaptel-commits] mattf: branch 1.2 r2786 - /branches/1.2/fxotune.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Fri Jul 27 14:32:26 CDT 2007


Author: mattf
Date: Fri Jul 27 14:32:25 2007
New Revision: 2786

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2786
Log:
Quick fix for could not fill input buffer errors

Modified:
    branches/1.2/fxotune.c

Modified: branches/1.2/fxotune.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/fxotune.c?view=diff&rev=2786&r1=2785&r2=2786
==============================================================================
--- branches/1.2/fxotune.c (original)
+++ branches/1.2/fxotune.c Fri Jul 27 14:32:25 2007
@@ -231,11 +231,15 @@
 				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 */




More information about the zaptel-commits mailing list