summaryrefslogtreecommitdiff
path: root/code/test
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2017-09-06 18:19:00 +0200
committerUros Majstorovic <majstor@majstor.org>2017-09-06 18:19:00 +0200
commitc129b10bf7c851d94002767aa09e06c526cacb7d (patch)
treea0ca2c8d603a233c43c888dddb4ee541d4ba34e5 /code/test
parentb83e58e21ea7dda57ddfda47bd1539d15abe687f (diff)
frad/defrag implemented
Diffstat (limited to 'code/test')
-rw-r--r--code/test/basic.c4
-rw-r--r--code/test/client.c2
-rw-r--r--code/test/echo.c2
-rw-r--r--code/test/server.c2
-rw-r--r--code/test/stress.c6
-rw-r--r--code/test/vc_client.c2
-rw-r--r--code/test/vc_server.c2
-rw-r--r--code/test/voip.c2
8 files changed, 11 insertions, 11 deletions
diff --git a/code/test/basic.c b/code/test/basic.c
index dae2819..5627fd3 100644
--- a/code/test/basic.c
+++ b/code/test/basic.c
@@ -35,7 +35,7 @@ ssize_t handle_open_c(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsign
ecp_pld_set_type(payload, MTYPE_MSG);
strcpy((char *)buf, msg);
- ssize_t _rv = ecp_send(conn, payload, sizeof(payload));
+ ssize_t _rv = ecp_pld_send(conn, payload, sizeof(payload));
return s;
}
@@ -53,7 +53,7 @@ ssize_t handle_msg_s(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigne
ecp_pld_set_type(payload, MTYPE_MSG);
strcpy((char *)buf, msg);
- ssize_t _rv = ecp_send(conn, payload, sizeof(payload));
+ ssize_t _rv = ecp_pld_send(conn, payload, sizeof(payload));
return s;
}
diff --git a/code/test/client.c b/code/test/client.c
index 992479b..edde70b 100644
--- a/code/test/client.c
+++ b/code/test/client.c
@@ -31,7 +31,7 @@ ssize_t handle_open_c(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsign
ecp_pld_set_type(payload, MTYPE_MSG);
strcpy((char *)buf, msg);
- ssize_t _rv = ecp_send(conn, payload, sizeof(payload));
+ ssize_t _rv = ecp_pld_send(conn, payload, sizeof(payload));
return s;
}
diff --git a/code/test/echo.c b/code/test/echo.c
index 593b904..aa27529 100644
--- a/code/test/echo.c
+++ b/code/test/echo.c
@@ -15,7 +15,7 @@ ECPConnHandler handler_s;
#define MTYPE_MSG 8
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_PLD_HDR-1, ECP_SIZE_PLD_HDR+1+s);
+ ssize_t rv = ecp_pld_send(conn, p-ECP_SIZE_PLD_HDR-1, ECP_SIZE_PLD_HDR+1+s);
return s;
}
diff --git a/code/test/server.c b/code/test/server.c
index 471164e..1b2e2b1 100644
--- a/code/test/server.c
+++ b/code/test/server.c
@@ -23,7 +23,7 @@ ssize_t handle_msg_s(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigne
ecp_pld_set_type(payload, MTYPE_MSG);
strcpy((char *)buf, msg);
- ssize_t _rv = ecp_send(conn, payload, sizeof(payload));
+ ssize_t _rv = ecp_pld_send(conn, payload, sizeof(payload));
return s;
}
diff --git a/code/test/stress.c b/code/test/stress.c
index d1ead1d..0e46f84 100644
--- a/code/test/stress.c
+++ b/code/test/stress.c
@@ -86,7 +86,7 @@ void *sender(ECPConnection *c) {
usleep(rnd % (2000000/msg_rate));
ecp_pld_set_type(payload, MTYPE_MSG);
- ssize_t _rv = ecp_send(c, payload, sizeof(payload));
+ ssize_t _rv = ecp_pld_send(c, payload, sizeof(payload));
if (c_start && (_rv > 0)) {
pthread_mutex_lock(&t_mtx[idx]);
t_sent[idx]++;
@@ -121,14 +121,14 @@ ssize_t handle_msg_c(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigne
}
// ecp_pld_set_type(payload, MTYPE_MSG);
- // ssize_t _rv = ecp_send(c, payload, sizeof(payload));
+ // ssize_t _rv = ecp_pld_send(c, payload, sizeof(payload));
return 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, 0)];
ecp_pld_set_type(payload, MTYPE_MSG);
- ssize_t _rv = ecp_send(conn, payload, sizeof(payload));
+ ssize_t _rv = ecp_pld_send(conn, payload, sizeof(payload));
return s;
}
diff --git a/code/test/vc_client.c b/code/test/vc_client.c
index d5cb8f2..eb23d05 100644
--- a/code/test/vc_client.c
+++ b/code/test/vc_client.c
@@ -37,7 +37,7 @@ ssize_t handle_open(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned
ecp_pld_set_type(payload, MTYPE_MSG);
strcpy((char *)buf, msg);
- ssize_t _rv = ecp_send(conn, payload, sizeof(payload));
+ ssize_t _rv = ecp_pld_send(conn, payload, sizeof(payload));
return s;
}
diff --git a/code/test/vc_server.c b/code/test/vc_server.c
index 47c6267..455f1a0 100644
--- a/code/test/vc_server.c
+++ b/code/test/vc_server.c
@@ -32,7 +32,7 @@ ssize_t handle_msg(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned
ecp_pld_set_type(payload, MTYPE_MSG);
strcpy((char *)buf, msg);
- ssize_t _rv = ecp_send(conn, payload, sizeof(payload));
+ ssize_t _rv = ecp_pld_send(conn, payload, sizeof(payload));
return s;
}
diff --git a/code/test/voip.c b/code/test/voip.c
index db1ea9f..4c3d30b 100644
--- a/code/test/voip.c
+++ b/code/test/voip.c
@@ -191,6 +191,6 @@ int main(int argc, char *argv[]) {
opus_buf = ecp_pld_get_buf(payload, 0);
opus_int32 len = a_read(handle_cpt, alsa_in_buf, alsa_frames, opus_enc, opus_buf, ECP_MAX_MSG);
if (len < 0) continue;
- ssize_t _rv = ecp_send(&conn, payload, len);
+ ssize_t _rv = ecp_pld_send(&conn, payload, len);
}
} \ No newline at end of file