Skip to content

Commit

Permalink
Remove dead !HAVE_LWIP_UDP_BIND_NETIF configuration
Browse files Browse the repository at this point in the history
This define came in with the initial import, but we never provided any
way to turn it off. Remove that case as dead code.
  • Loading branch information
mspang committed Dec 15, 2023
1 parent 221e466 commit e72182f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions src/inet/UDPEndPointImplLwIP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@

#include <inet/UDPEndPointImplLwIP.h>

#if CHIP_HAVE_CONFIG_H
#include <lwip/lwip_buildconfig.h> // nogncheck
#endif // CHIP_HAVE_CONFIG_H

#if INET_CONFIG_ENABLE_IPV4
#include <lwip/igmp.h>
#endif // INET_CONFIG_ENABLE_IPV4
Expand Down Expand Up @@ -121,13 +117,9 @@ CHIP_ERROR UDPEndPointImplLwIP::LwIPBindInterface(struct udp_pcb * aUDP, Interfa

InterfaceId UDPEndPointImplLwIP::GetBoundInterface() const
{
#if HAVE_LWIP_UDP_BIND_NETIF
struct netif * netif;
RunOnTCPIP([this, &netif]() { netif = netif_get_by_index(mUDP->netif_idx); });
return InterfaceId(netif);
#else
return InterfaceId(mUDP->intf_filter);
#endif
}

uint16_t UDPEndPointImplLwIP::GetBoundPort() const
Expand Down
3 changes: 2 additions & 1 deletion src/lwip/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ buildconfig_header("lwip_buildconfig") {
header = "lwip_buildconfig.h"
header_dir = "lwip"

defines = [ "HAVE_LWIP_UDP_BIND_NETIF=1" ]
defines = []

if (lwip_platform != "external") {
if (lwip_debug) {
# Automatically enable LWIP_DEBUG for internal is_debug builds.
Expand Down
1 change: 0 additions & 1 deletion src/platform/mt793x/lwip/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import("${mt793x_sdk_build_root}/mt793x_sdk.gni")
# header = "lwip_buildconfig.h"
# header_dir = "lwip"
#
# defines = [ "HAVE_LWIP_UDP_BIND_NETIF=1" ]
# if (lwip_platform != "external") {
# if (current_os == "android") {
# defines += [ "LWIP_NO_STDINT_H=1" ]
Expand Down

0 comments on commit e72182f

Please sign in to comment.