diff options
author | Uros Majstorovic <majstor@majstor.org> | 2020-08-07 19:26:12 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2020-08-07 19:26:12 +0200 |
commit | 3af816f20b94326b05a6dde21d7f734df14b61d3 (patch) | |
tree | a4bbdb6e22c670b7231d9d909dc6b75fe9c5433e /fw/esp32/components/eos/sock.c | |
parent | a35636fc4a55e6b0cfbb5772f7274ee749059836 (diff) |
net driver: removed obsolete flags; urc process simplefied; pcm: added active flag; tested cell voice/data
Diffstat (limited to 'fw/esp32/components/eos/sock.c')
-rw-r--r-- | fw/esp32/components/eos/sock.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fw/esp32/components/eos/sock.c b/fw/esp32/components/eos/sock.c index 17357e4..2691a67 100644 --- a/fw/esp32/components/eos/sock.c +++ b/fw/esp32/components/eos/sock.c @@ -91,6 +91,7 @@ static void udp_rcvr_task(void *pvParameters) { rv = t_recvfrom(sock, buf+EOS_SOCK_SIZE_UDP_HDR, EOS_NET_SIZE_BUF-EOS_SOCK_SIZE_UDP_HDR, &addr); if (rv < 0) { sock = 0; + eos_net_free(buf); ESP_LOGE(TAG, "UDP RECV ERR:%d", rv); continue; } @@ -98,7 +99,7 @@ static void udp_rcvr_task(void *pvParameters) { buf[1] = esock; memcpy(buf+2, addr.host, sizeof(addr.host)); memcpy(buf+2+sizeof(addr.host), &addr.port, sizeof(addr.port)); - eos_net_send(EOS_NET_MTYPE_SOCK, buf, rv+EOS_SOCK_SIZE_UDP_HDR, 0); + eos_net_send(EOS_NET_MTYPE_SOCK, buf, rv+EOS_SOCK_SIZE_UDP_HDR); } while(sock); xSemaphoreTake(mutex, portMAX_DELAY); _socks[esock-1] = 0; @@ -141,7 +142,7 @@ static void sock_handler(unsigned char type, unsigned char *buffer, uint16_t siz rbuf = eos_net_alloc(); rbuf[0] = EOS_SOCK_MTYPE_OPEN_DGRAM; rbuf[1] = esock; - eos_net_send(EOS_NET_MTYPE_SOCK, rbuf, 2, 0); + eos_net_send(EOS_NET_MTYPE_SOCK, rbuf, 2); break; case EOS_SOCK_MTYPE_CLOSE: |