From 93723810d170ec563ba764739439040b41c8d798 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Fri, 21 Mar 2008 01:20:26 +0000 Subject: * Get hdlcstress and hdlctest to build. * Make sure everything's initialized in hdlctest.c . git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@4038 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- hdlcstress.c | 11 +++-------- hdlctest.c | 15 ++++++--------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/hdlcstress.c b/hdlcstress.c index 70505a2..9f436fe 100644 --- a/hdlcstress.c +++ b/hdlcstress.c @@ -2,8 +2,9 @@ #include #include #include -#include +#include "zaptel.h" #include +#include #include #include #include @@ -74,7 +75,6 @@ void send_packet(unsigned char *buf, int len) { int res; int x; - int out; unsigned char outbuf[BLOCK_SIZE]; int pos=0; unsigned int fcs = PPP_INITFCS; @@ -112,17 +112,12 @@ void send_packet(unsigned char *buf, int len) 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 \n"); exit(1); diff --git a/hdlctest.c b/hdlctest.c index d67a552..306d431 100644 --- a/hdlctest.c +++ b/hdlctest.c @@ -2,8 +2,9 @@ #include #include #include -#include +#include "zaptel.h" #include +#include #include #include #include @@ -129,25 +130,21 @@ int check_frame(unsigned char *outbuf, int res) 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) { -- cgit v1.2.3