summaryrefslogtreecommitdiff
path: root/code/test/echo.c
diff options
context:
space:
mode:
Diffstat (limited to 'code/test/echo.c')
-rw-r--r--code/test/echo.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/code/test/echo.c b/code/test/echo.c
index aa27529..ff9c01c 100644
--- a/code/test/echo.c
+++ b/code/test/echo.c
@@ -14,8 +14,11 @@ ECPConnHandler handler_s;
#define CTYPE_TEST 0
#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_pld_send(conn, p-ECP_SIZE_PLD_HDR-1, ECP_SIZE_PLD_HDR+1+s);
+ssize_t handle_msg_s(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s, ECP2Buffer *b) {
+ unsigned char buf[ECP_MAX_PLD];
+
+ memcpy(buf, p, s);
+ ssize_t _rv = ecp_send(conn, t, buf, s);
return s;
}