[zaptel-commits] mattf: branch 1.4 r2972 - /branches/1.4/patlooptest.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Tue Aug 28 13:48:10 CDT 2007


Author: mattf
Date: Tue Aug 28 13:48:10 2007
New Revision: 2972

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2972
Log:
Revert the patlooptest changes

Modified:
    branches/1.4/patlooptest.c

Modified: branches/1.4/patlooptest.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/patlooptest.c?view=diff&rev=2972&r1=2971&r2=2972
==============================================================================
--- branches/1.4/patlooptest.c (original)
+++ branches/1.4/patlooptest.c Tue Aug 28 13:48:10 2007
@@ -3,8 +3,6 @@
 #include <string.h>
 #include <errno.h>
 #include <stdio.h>
-#include <linux/types.h>
-#include <linux/ppp_defs.h> 
 #include <sys/ioctl.h>
 #include <unistd.h>
 #include <stdlib.h>
@@ -62,7 +60,6 @@
 	}
 	ioctl(fd, ZT_GETEVENT);
 
-restart:
 	i = ZT_FLUSH_ALL;
 	if (ioctl(fd,ZT_FLUSH,&i) == -1)
 	   {
@@ -86,7 +83,7 @@
 			printf("Res is %d: %s\n", res, strerror(errno));
 			ioctl(fd, ZT_GETEVENT, &x);
 			printf("Event: %d\n", x);
-			continue;
+			exit(1);
 		}
 
 		if (skipcount)
@@ -100,9 +97,7 @@
 		res = read(fd, inbuf, bs);
 		if (res < bs) {
 			printf("Res is %d\n", res);
-			ioctl(fd, ZT_GETEVENT, &x);
-			printf("Event: %d\n", x);
-			continue;
+			exit(1);
 		}
 		if (!setup) {
 			c = inbuf[0];




More information about the zaptel-commits mailing list