mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-23 23:51:03 +03:00
[RIOT] coap_io.c: set length in received packet
This commit is contained in:
1 parent
d65183a946
commit
787f999f35
1 file changed
+2
@@ -1137,6 +1137,8 @@ coap_network_read(coap_socket_t *sock, coap_packet_t *packet) {
|
||||
packet->src.size = sizeof(packet->src.addr);
|
||||
len = recvfrom (sock->fd, packet->payload, COAP_RXBUFFER_SIZE,
|
||||
0, &packet->src.addr.sa, &packet->src.size);
|
||||
packet->ifindex = sock->fd;
|
||||
packet->length = (len > 0) ? len : 0;
|
||||
if (LOG_DEBUG <= coap_get_log_level()) {
|
||||
unsigned char addr_str[INET6_ADDRSTRLEN + 8];
|
||||
|
||||
|
||||
Reference in new issue
Block a user