Skip to content

Commit

Permalink
AP_Networking: use IP4_STR_LEN define for IP string
Browse files Browse the repository at this point in the history
Co-authored-by: Tom Pittenger <[email protected]>
  • Loading branch information
bugobliterator and magicrub authored Feb 17, 2024
1 parent aba91f6 commit 607ad24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/AP_Networking/AP_Networking_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ bool AP_Networking::Port::send_receive(void)
sock->last_recv_address(last_addr, last_port);
if (last_addr != 0 && last_port != 0) {
if (!connected || (last_addr != last_udp_connect_address) || (last_port != last_udp_connect_port)) {
char last_addr_str[16];
sock->inet_addr_to_str(last_addr, last_addr_str, 16);
char last_addr_str[IP4_STR_LEN];
sock->inet_addr_to_str(last_addr, last_addr_str, sizeof(last_addr_str));
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "UDP[%u]: connected to %s:%u", unsigned(state.idx), last_addr_str, unsigned(last_port));
connected = true;
last_udp_connect_address = last_addr;
Expand Down

0 comments on commit 607ad24

Please sign in to comment.