From c129b10bf7c851d94002767aa09e06c526cacb7d Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Wed, 6 Sep 2017 18:19:00 +0200 Subject: frad/defrag implemented --- code/test/basic.c | 4 ++-- code/test/client.c | 2 +- code/test/echo.c | 2 +- code/test/server.c | 2 +- code/test/stress.c | 6 +++--- code/test/vc_client.c | 2 +- code/test/vc_server.c | 2 +- code/test/voip.c | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) (limited to 'code/test') 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 -- cgit v1.2.3