[zaptel-commits] tzafrir: branch 1.2 r4038 - in /branches/1.2: hdlcstress.c hdlctest.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Thu Mar 20 20:20:26 CDT 2008


Author: tzafrir
Date: Thu Mar 20 20:20:26 2008
New Revision: 4038

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4038
Log:
* Get hdlcstress and hdlctest to build.
* Make sure everything's initialized in hdlctest.c .

Modified:
    branches/1.2/hdlcstress.c
    branches/1.2/hdlctest.c

Modified: branches/1.2/hdlcstress.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/hdlcstress.c?view=diff&rev=4038&r1=4037&r2=4038
==============================================================================
--- branches/1.2/hdlcstress.c (original)
+++ branches/1.2/hdlcstress.c Thu Mar 20 20:20:26 2008
@@ -2,8 +2,9 @@
 #include <fcntl.h>
 #include <string.h>
 #include <errno.h>
-#include <linux/zaptel.h>
+#include "zaptel.h"
 #include <stdio.h>
+#include <linux/types.h>
 #include <linux/ppp_defs.h> 
 #include <sys/ioctl.h>
 #include <unistd.h>
@@ -74,7 +75,6 @@
 {
 	int res;
 	int x;
-	int out;
 	unsigned char outbuf[BLOCK_SIZE];
 	int pos=0;
 	unsigned int fcs = PPP_INITFCS;
@@ -112,17 +112,12 @@
 
 int main(int argc, char *argv[])
 {
-	int fd2;
-	int ires, res, x;
-	int i;
+	int res, x;
 	ZT_PARAMS tp;
 	ZT_BUFFERINFO bi;
 	int bs = BLOCK_SIZE;
 	unsigned char c=0;
-	unsigned char inbuf[BLOCK_SIZE];
 	unsigned char outbuf[BLOCK_SIZE];
-	unsigned int fcs;
-	static int packets=0;
 	if (argc < 2) {
 		fprintf(stderr, "Usage: markhdlctest <tor device>\n");
 		exit(1);

Modified: branches/1.2/hdlctest.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/hdlctest.c?view=diff&rev=4038&r1=4037&r2=4038
==============================================================================
--- branches/1.2/hdlctest.c (original)
+++ branches/1.2/hdlctest.c Thu Mar 20 20:20:26 2008
@@ -2,8 +2,9 @@
 #include <fcntl.h>
 #include <string.h>
 #include <errno.h>
-#include <linux/zaptel.h>
+#include "zaptel.h"
 #include <stdio.h>
+#include <linux/types.h>
 #include <linux/ppp_defs.h> 
 #include <sys/ioctl.h>
 #include <unistd.h>
@@ -129,25 +130,21 @@
 int main(int argc, char *argv[])
 {
 	int fd;
-	int fd2;
-	int ires, res, x;
-	int i;
+	int res, x;
 	ZT_PARAMS tp;
 	ZT_BUFFERINFO bi;
 	int bs = BLOCK_SIZE;
 	int pos = 0;
 	unsigned char inbuf[BLOCK_SIZE];
 	unsigned char outbuf[BLOCK_SIZE];
-	unsigned int fcs;
-	static int packets=0;
 	int bytes=0;
 	int out;
 	unsigned int olddata1;
 	int oldones1;
 	int oldbits1;
-	unsigned int olddata;
-	int oldones;
-	int oldbits;
+	unsigned int olddata = 0;
+	int oldones = 0;
+	int oldbits = 0;
 	int hdlcmode = 0;
 	struct fasthdlc_state fs;
 	if (argc < 2) {




More information about the zaptel-commits mailing list