From 1d94976e09413eba32972b3c60f30e2ee83dbcdb Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Sat, 7 Oct 2023 21:34:50 -0700 Subject: [PATCH] client: net: Fix port byte order Docs ( https://www.nongnu.org/lwip/2_0_x/group__udp__raw.html ) say "ipaddr & port are expected to be in the same byte order as in the pcb," which apparently means _don't_ run it through htons(). --- client/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/net.c b/client/net.c index da33727..c692a12 100644 --- a/client/net.c +++ b/client/net.c @@ -23,7 +23,7 @@ static void initialize_the_pcb() { if (ip4addr_aton(tattle_server_ip_address, &ipaddr) == 0) signal_error_by_blinking(); - if (udp_connect(the_pcb, &ipaddr, htons(tattle_port)) != ERR_OK) + if (udp_connect(the_pcb, &ipaddr, tattle_port) != ERR_OK) signal_error_by_blinking(); } -- 2.44.1