From 464cd6fd1bec2a7c38ffc54d5bf8be4a9eb55504 Mon Sep 17 00:00:00 2001 From: Ulysse Cura Date: Fri, 23 May 2025 18:21:44 +0200 Subject: [PATCH] Corrected a bug in udp client : Some data that the callback receive were not interpreted correctly (and it may not be okay still) --- src/udp/udp_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/udp/udp_client.c b/src/udp/udp_client.c index 46c814a..465f859 100644 --- a/src/udp/udp_client.c +++ b/src/udp/udp_client.c @@ -17,9 +17,9 @@ static inline void handle_receive(struct pbuf *p, const ip_addr_t *addr, u16_t p pbuf_free(p); } -static inline void udp_receive_callback(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) +static void udp_receive_callback(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) { - udp_client = *(udp_client_t *)&arg; + udp_client_t *udp_client_received_data = (udp_client_t *)arg; handle_receive(p, addr, port); }