summaryrefslogtreecommitdiff
path: root/code/test
diff options
context:
space:
mode:
Diffstat (limited to 'code/test')
-rw-r--r--code/test/basic.c8
-rw-r--r--code/test/client.c6
-rw-r--r--code/test/echo.c2
-rw-r--r--code/test/pr_client.c6
-rw-r--r--code/test/pr_server.c6
-rw-r--r--code/test/server.c2
-rw-r--r--code/test/stress.c8
-rw-r--r--code/test/voip.c4
8 files changed, 21 insertions, 21 deletions
diff --git a/code/test/basic.c b/code/test/basic.c
index 36dfc2e..c9f6bd5 100644
--- a/code/test/basic.c
+++ b/code/test/basic.c
@@ -20,10 +20,10 @@ ECPConnection conn;
#define CTYPE_TEST 0
#define MTYPE_MSG 8
-ssize_t handle_open_c(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_open_c(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
uint32_t seq = 0;
- ecp_conn_handle_open(conn, t, p, s);
+ ecp_conn_handle_open(conn, sq, t, p, s);
if (s < 0) {
printf("OPEN ERR:%ld\n", s);
return 0;
@@ -39,12 +39,12 @@ ssize_t handle_open_c(ECPConnection *conn, unsigned char t, unsigned char *p, ss
return 0;
}
-ssize_t handle_msg_c(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_msg_c(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
printf("MSG C:%s size:%ld\n", p, s);
return s;
}
-ssize_t handle_msg_s(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_msg_s(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
printf("MSG S:%s size:%ld\n", p, s);
unsigned char payload[ECP_SIZE_PLD(1000)];
diff --git a/code/test/client.c b/code/test/client.c
index 3f33d71..6e45df4 100644
--- a/code/test/client.c
+++ b/code/test/client.c
@@ -16,10 +16,10 @@ ECPConnection conn;
#define CTYPE_TEST 0
#define MTYPE_MSG 8
-ssize_t handle_open_c(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_open_c(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
uint32_t seq = 0;
- ecp_conn_handle_open(conn, t, p, s);
+ ecp_conn_handle_open(conn, sq, t, p, s);
if (s < 0) {
printf("OPEN ERR:%ld\n", s);
return 0;
@@ -35,7 +35,7 @@ ssize_t handle_open_c(ECPConnection *conn, unsigned char t, unsigned char *p, ss
return 0;
}
-ssize_t handle_msg_c(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_msg_c(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
printf("MSG C:%s size:%ld\n", p, s);
return s;
}
diff --git a/code/test/echo.c b/code/test/echo.c
index 2494868..fe17901 100644
--- a/code/test/echo.c
+++ b/code/test/echo.c
@@ -14,7 +14,7 @@ ECPConnHandler handler_s;
#define CTYPE_TEST 0
#define MTYPE_MSG 8
-ssize_t handle_msg_s(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_msg_s(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
ssize_t rv = ecp_send(conn, p-ECP_SIZE_MSG_HDR, ECP_SIZE_MSG_HDR+s);
return s;
diff --git a/code/test/pr_client.c b/code/test/pr_client.c
index 7d0cd90..7b80d6f 100644
--- a/code/test/pr_client.c
+++ b/code/test/pr_client.c
@@ -20,10 +20,10 @@ ECPNode node_proxy[20];
#define CTYPE_TEST 0
#define MTYPE_MSG 8
-ssize_t handle_open(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_open(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
uint32_t seq = 0;
- ecp_conn_handle_open(conn, t, p, s);
+ ecp_conn_handle_open(conn, sq, t, p, s);
if (s < 0) {
printf("OPEN ERR:%ld\n", s);
return 0;
@@ -41,7 +41,7 @@ ssize_t handle_open(ECPConnection *conn, unsigned char t, unsigned char *p, ssiz
return 0;
}
-ssize_t handle_msg(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_msg(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
printf("MSG S:%s size:%ld\n", p, s);
return s;
}
diff --git a/code/test/pr_server.c b/code/test/pr_server.c
index 0f898ce..2fd81a6 100644
--- a/code/test/pr_server.c
+++ b/code/test/pr_server.c
@@ -18,12 +18,12 @@ ECPConnection conn;
#define CTYPE_TEST 0
#define MTYPE_MSG 8
-ssize_t handle_open(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_open(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
printf("OPEN RECEIVED\n");
- return ecp_conn_handle_open(conn, t, p, s);
+ return ecp_conn_handle_open(conn, sq, t, p, s);
}
-ssize_t handle_msg(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_msg(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
printf("MSG S:%s size:%ld\n", p, s);
unsigned char payload[ECP_SIZE_PLD(1000)];
diff --git a/code/test/server.c b/code/test/server.c
index a83c1c5..6851cdf 100644
--- a/code/test/server.c
+++ b/code/test/server.c
@@ -14,7 +14,7 @@ ECPConnHandler handler_s;
#define CTYPE_TEST 0
#define MTYPE_MSG 8
-ssize_t handle_msg_s(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_msg_s(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
printf("MSG S:%s size:%ld\n", p, s);
unsigned char payload[ECP_SIZE_PLD(1000)];
diff --git a/code/test/stress.c b/code/test/stress.c
index c76ebe9..42663fc 100644
--- a/code/test/stress.c
+++ b/code/test/stress.c
@@ -95,11 +95,11 @@ void *sender(ECPConnection *c) {
}
}
-ssize_t handle_open_c(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_open_c(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
int idx = (int)(conn->conn_data);
int rv = 0;
- ecp_conn_handle_open(conn, t, p, s);
+ ecp_conn_handle_open(conn, sq, t, p, s);
rv = pthread_create(&s_thd[idx], NULL, (void *(*)(void *))sender, (void *)conn);
if (rv) {
char msg[256];
@@ -110,7 +110,7 @@ ssize_t handle_open_c(ECPConnection *conn, unsigned char t, unsigned char *p, ss
return 0;
}
-ssize_t handle_msg_c(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_msg_c(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
int idx = (int)(conn->conn_data);
unsigned char payload[ECP_SIZE_PLD(1000)];
@@ -125,7 +125,7 @@ ssize_t handle_msg_c(ECPConnection *conn, unsigned char t, unsigned char *p, ssi
return s;
}
-ssize_t handle_msg_s(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_msg_s(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
unsigned char payload[ECP_SIZE_PLD(1000)];
ecp_pld_set_type(payload, MTYPE_MSG);
ssize_t _rv = ecp_send(conn, payload, sizeof(payload));
diff --git a/code/test/voip.c b/code/test/voip.c
index 673bb8a..67e1afe 100644
--- a/code/test/voip.c
+++ b/code/test/voip.c
@@ -123,7 +123,7 @@ int a_init(void) {
opus_decoder_init(opus_dec, sample_rate, nchannels);
}
-ssize_t handle_open_c(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_open_c(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
uint32_t seq = 0;
ecp_conn_handle_open(conn, t, p, s);
@@ -137,7 +137,7 @@ ssize_t handle_open_c(ECPConnection *conn, unsigned char t, unsigned char *p, ss
return s;
}
-ssize_t handle_msg_c(ECPConnection *conn, unsigned char t, unsigned char *p, ssize_t s) {
+ssize_t handle_msg_c(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s) {
a_write(opus_dec, p, s, handle_plb, alsa_out_buf, alsa_frames);
return s;
}