From b9d0e6e824f222e7f6647806b6afb3c2f4727ab5 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sat, 20 Jan 2018 19:15:35 +0100 Subject: added support for vconn --- code/fe310/eos/ecp.c | 3 ++- code/fe310/eos/ecp.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'code/fe310') diff --git a/code/fe310/eos/ecp.c b/code/fe310/eos/ecp.c index 190d1f0..b50e0d7 100644 --- a/code/fe310/eos/ecp.c +++ b/code/fe310/eos/ecp.c @@ -49,6 +49,7 @@ static void packet_handler(unsigned char cmd, unsigned char *buffer, uint16_t le memcpy(addr.host, buffer, sizeof(addr.host)); memcpy(&addr.port, buffer+sizeof(addr.host), sizeof(addr.port)); ssize_t rv = ecp_pkt_handle(_sock, &addr, NULL, &bufs, len-addr_len); + if (rv < 0) DPRINT(rv, "ERR:packet_handler - RV:%d\n", rv); if (bufs.packet->buffer) eos_net_free(buffer, 0); eos_net_release(0); } @@ -56,7 +57,7 @@ static void packet_handler(unsigned char cmd, unsigned char *buffer, uint16_t le int ecp_init(ECPContext *ctx) { int rv; - rv = ecp_ctx_create(ctx); + rv = ecp_ctx_create_vconn(ctx); if (rv) return rv; eos_evtq_set_handler(EOS_EVT_TIMER, timer_handler); diff --git a/code/fe310/eos/ecp.h b/code/fe310/eos/ecp.h index e4722e8..eb89aa2 100644 --- a/code/fe310/eos/ecp.h +++ b/code/fe310/eos/ecp.h @@ -1,5 +1,6 @@ #include #include +#include int ecp_init(ECPContext *ctx); void ecp_sock_set(ECPSocket *s); \ No newline at end of file -- cgit v1.2.3