summaryrefslogtreecommitdiff
path: root/code/ecp
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2019-12-06 20:04:08 +0100
committerUros Majstorovic <majstor@majstor.org>2019-12-06 20:04:08 +0100
commit0bcbb62eb408e6fcbfe78fbc2756dfb1b9ae6a37 (patch)
tree8517595e723686fd8954f0640c5fc40c36e88a67 /code/ecp
parentbc37c471fbb233a2a17119091b10f7adf8045a95 (diff)
net refactor: alloc reverted to take void arg; EOS_NET_FLAGs renamed
Diffstat (limited to 'code/ecp')
-rw-r--r--code/ecp/fe310/time.c3
-rw-r--r--code/ecp/fe310/transport.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/code/ecp/fe310/time.c b/code/ecp/fe310/time.c
index dee4285..a5c109d 100644
--- a/code/ecp/fe310/time.c
+++ b/code/ecp/fe310/time.c
@@ -2,6 +2,7 @@
#include <tr.h>
#include <eos/eos.h>
+#include <eos/net.h>
#include <eos/event.h>
#include <eos/timer.h>
@@ -18,7 +19,7 @@ static void timer_handler(unsigned char type) {
}
int ecp_tm_init(ECPContext *ctx) {
- eos_timer_set_handler(EOS_TIMER_ETYPE_ECP, timer_handler, EOS_EVT_FLAG_NET_BUF_ACQ);
+ eos_timer_set_handler(EOS_TIMER_ETYPE_ECP, timer_handler, EOS_NET_FLAG_BACQ);
return ECP_OK;
}
diff --git a/code/ecp/fe310/transport.c b/code/ecp/fe310/transport.c
index a49d3b6..6da5139 100644
--- a/code/ecp/fe310/transport.c
+++ b/code/ecp/fe310/transport.c
@@ -85,7 +85,7 @@ ssize_t ecp_tr_send(ECPSocket *sock, ECPBuffer *packet, size_t msg_size, ECPNetA
buf = packet->buffer-EOS_SOCK_SIZE_UDP_HDR;
packet->buffer = NULL;
} else {
- buf = eos_net_alloc(1);
+ buf = eos_net_alloc();
memcpy(buf+EOS_SOCK_SIZE_UDP_HDR, packet->buffer, msg_size);
}
}