diff options
author | Uros Majstorovic <majstor@majstor.org> | 2019-12-04 06:09:59 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2019-12-04 06:09:59 +0100 |
commit | 2c981aec5e5c10f9fd036dfb48105b16f16e4233 (patch) | |
tree | 4d191cbb595202579c961214a116fe0e1faeb5e7 /code/fe310/eos/sock.c | |
parent | da01d561d0c0365d985516d3696b17302fd33770 (diff) |
net bugfix; net alloc changed
Diffstat (limited to 'code/fe310/eos/sock.c')
-rw-r--r-- | code/fe310/eos/sock.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/code/fe310/eos/sock.c b/code/fe310/eos/sock.c index ab0fc59..b690dc4 100644 --- a/code/fe310/eos/sock.c +++ b/code/fe310/eos/sock.c @@ -48,7 +48,7 @@ void eos_sock_init(void) { int eos_sock_open_udp(void) { unsigned char type = EOS_SOCK_MTYPE_OPEN_DGRAM; - unsigned char *buffer = eos_net_alloc(); + unsigned char *buffer = eos_net_alloc(1); uint16_t buf_size; int rv, sock; @@ -70,7 +70,7 @@ int eos_sock_open_udp(void) { } void eos_sock_close(int sock) { - unsigned char *buffer = eos_net_alloc(); + unsigned char *buffer = eos_net_alloc(1); buffer[0] = EOS_SOCK_MTYPE_CLOSE; buffer[1] = sock; eos_net_send(EOS_NET_MTYPE_SOCK, buffer, 2, 1); @@ -105,5 +105,3 @@ void eos_sock_set_handler(int sock, eos_sock_fptr_t handler, uint8_t flags) { } sock_handler[sock] = handler; } - - |