mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
fix host emulation (#5382)
This commit is contained in:
parent
5fcb8f1dac
commit
dc5e352676
@ -120,8 +120,10 @@ DEBUG += -DDEBUG_ESP_PORT=Serial
|
|||||||
DEBUG += -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_MDNS
|
DEBUG += -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_MDNS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CXXFLAGS += $(DEBUG) -std=c++11 -Wall -Werror -coverage $(OPTZ) -fno-common -g $(M32)
|
FLAGS += $(DEBUG) -Wall -Werror -coverage $(OPTZ) -fno-common -g $(M32)
|
||||||
CFLAGS += -std=c99 -Wall -Werror -coverage $(OPTZ) -fno-common -g $(M32)
|
FLAGS += -DLWIP_IPV6=0
|
||||||
|
CXXFLAGS += -std=c++11 $(FLAGS)
|
||||||
|
CFLAGS += -std=c99 $(FLAGS)
|
||||||
LDFLAGS += -coverage $(OPTZ) -g $(M32)
|
LDFLAGS += -coverage $(OPTZ) -g $(M32)
|
||||||
VALGRINDFLAGS += --leak-check=full --track-origins=yes --error-limit=no --show-leak-kinds=all --error-exitcode=999
|
VALGRINDFLAGS += --leak-check=full --track-origins=yes --error-limit=no --show-leak-kinds=all --error-exitcode=999
|
||||||
CXXFLAGS += -Wno-error=format-security # cores/esp8266/Print.cpp:42:24: error: format not a string literal and no format arguments [-Werror=format-security] -- (os_printf_plus(not_the_best_way))
|
CXXFLAGS += -Wno-error=format-security # cores/esp8266/Print.cpp:42:24: error: format not a string literal and no format arguments [-Werror=format-security] -- (os_printf_plus(not_the_best_way))
|
||||||
|
@ -44,7 +44,7 @@ extern "C" const ip_addr_t ip_addr_any = IPADDR4_INIT(IPADDR_ANY);
|
|||||||
|
|
||||||
// lwIP API side of WiFiServer
|
// lwIP API side of WiFiServer
|
||||||
|
|
||||||
WiFiServer::WiFiServer (IPAddress addr, uint16_t port)
|
WiFiServer::WiFiServer (const IPAddress& addr, uint16_t port)
|
||||||
{
|
{
|
||||||
(void)addr;
|
(void)addr;
|
||||||
if (port < 1024)
|
if (port < 1024)
|
||||||
|
@ -98,7 +98,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int connect(ip_addr_t* addr, uint16_t port)
|
int connect(const ip_addr_t* addr, uint16_t port)
|
||||||
{
|
{
|
||||||
return mockConnect(addr->addr, _sock, port);
|
return mockConnect(addr->addr, _sock, port);
|
||||||
}
|
}
|
||||||
|
@ -55,16 +55,16 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool connect (ip_addr_t addr, uint16_t port)
|
bool connect (const ip_addr_t* addr, uint16_t port)
|
||||||
{
|
{
|
||||||
_dst = addr;
|
_dst = *addr;
|
||||||
_dstport = port;
|
_dstport = port;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool listen(ip_addr_t addr, uint16_t port)
|
bool listen(const ip_addr_t* addr, uint16_t port)
|
||||||
{
|
{
|
||||||
bool ret = mockUDPListen(_sock, addr.addr, port, staticMCastAddr);
|
bool ret = mockUDPListen(_sock, addr->addr, port, staticMCastAddr);
|
||||||
register_udp(_sock, this);
|
register_udp(_sock, this);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user