summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2018-03-14 19:34:05 +0100
committerUros Majstorovic <majstor@majstor.org>2018-03-14 19:34:05 +0100
commit81a3176b689c546118be81565bcce16f47faae6b (patch)
tree7c622aec0d0fd1191b001e6197f64d791b30be87
parent2570f27d69bb85b814b497e3daeaaa28425bf18a (diff)
fixed make fot posix util/test
-rw-r--r--code/test/Makefile2
-rw-r--r--code/test/vc_client_t.c17
-rw-r--r--code/util/Makefile2
3 files changed, 11 insertions, 10 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];
diff --git a/code/util/Makefile b/code/util/Makefile
index 6e7227b..acbae33 100644
--- a/code/util/Makefile
+++ b/code/util/Makefile
@@ -1,4 +1,4 @@
-include ../ecp/Makefile.platform
+include ../ecp/Makefile.posix
CFLAGS=$(CFLAGS_PL) -I../ecp
LDFLAGS=$(LDFLAGS_PL)