Compare commits

...

2 Commits

Author SHA1 Message Date
Ulysse Cura 464cd6fd1b Corrected a bug in udp client :
Some data that the callback receive were not interpreted correctly (and it may not be okay still)
2025-05-23 18:21:44 +02:00
Ulysse Cura f6be2c4ec9 Corrected a variable name 2025-05-23 18:17:15 +02:00
2 changed files with 3 additions and 3 deletions

View File

@ -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);
}

View File

@ -83,5 +83,5 @@ void udp_server_send(const uint8_t *data, size_t length, const char *ip, uint16_
}
}
printf("Error sending data after %d tries...\n", retry);
printf("Error sending data after %d tries...\n", tries);
}