diff options
author | Uros Majstorovic <majstor@majstor.org> | 2018-03-14 19:34:05 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2018-03-14 19:34:05 +0100 |
commit | 81a3176b689c546118be81565bcce16f47faae6b (patch) | |
tree | 7c622aec0d0fd1191b001e6197f64d791b30be87 /code/test | |
parent | 2570f27d69bb85b814b497e3daeaaa28425bf18a (diff) |
fixed make fot posix util/test
Diffstat (limited to 'code/test')
-rw-r--r-- | code/test/Makefile | 2 | ||||
-rw-r--r-- | code/test/vc_client_t.c | 17 |
2 files changed, 10 insertions, 9 deletions
diff --git a/code/test/Makefile b/code/test/Makefile index ae400ee..9c804a3 100644 --- a/code/test/Makefile +++ b/code/test/Makefile @@ -1,4 +1,4 @@ -include ../ecp/Makefile.platform +include ../ecp/Makefile.posix CFLAGS=$(CFLAGS_PL) -I../ecp -I../util -Wno-int-to-void-pointer-cast LDFLAGS=$(LDFLAGS_PL) diff --git a/code/test/vc_client_t.c b/code/test/vc_client_t.c index 3a2402e..a530f2f 100644 --- a/code/test/vc_client_t.c +++ b/code/test/vc_client_t.c @@ -26,14 +26,12 @@ int counter = 0; uint64_t t_start = 0; uint64_t t_end = 0; ssize_t handle_open(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s, ECP2Buffer *b) { - uint32_t seq = 0; - - ecp_conn_handle_open(conn, sq, t, p, s, b); - if (s < 0) { + ssize_t rv = ecp_conn_handle_open(conn, sq, t, p, s, b); + if (rv < 0) { printf("OPEN ERR:%ld\n", s); - return s; + return rv; } - + char *msg = "PERA JE CAR!"; unsigned char buf[1000]; @@ -44,12 +42,15 @@ ssize_t handle_open(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned gettimeofday(&tv, NULL); t_start = tv.tv_sec*(uint64_t)1000000+tv.tv_usec; - return s; + return rv; } ssize_t handle_msg(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s, ECP2Buffer *b) { - counter++; + // write(2, p, s); + // fflush(stderr); // printf("MSG C:%s size:%ld\n", p, s); + // return s; + counter++; char *msg = "PERA JE CAR!"; unsigned char buf[1000]; |