summaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2018-01-20 19:15:35 +0100
committerUros Majstorovic <majstor@majstor.org>2018-01-20 19:15:35 +0100
commitb9d0e6e824f222e7f6647806b6afb3c2f4727ab5 (patch)
treea727ea5e98399e745c187e7ccfdb67d476aca200 /code
parent30b62efc8f044a7fd00e21c56490aefa32686a52 (diff)
added support for vconn
Diffstat (limited to 'code')
-rw-r--r--code/fe310/eos/ecp.c3
-rw-r--r--code/fe310/eos/ecp.h1
2 files changed, 3 insertions, 1 deletions
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 <ecp/config_fe310.h>
#include <ecp/core.h>
+#include <ecp/vconn/vconn.h>
int ecp_init(ECPContext *ctx);
void ecp_sock_set(ECPSocket *s); \ No newline at end of file