mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
emulation on host: fix internal udp management (#8561)
* emulation on host: fix internal udp management help dtors: clear map before exit, check with valgrind * fix style
This commit is contained in:
parent
80c0570620
commit
33afdc2723
@ -13,7 +13,8 @@ for i in ../../libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient \
|
|||||||
../../libraries/ESP8266WebServer/examples/HelloServer/HelloServer \
|
../../libraries/ESP8266WebServer/examples/HelloServer/HelloServer \
|
||||||
../../libraries/SD/examples/Files/Files \
|
../../libraries/SD/examples/Files/Files \
|
||||||
../../libraries/LittleFS/examples/LittleFS_Timestamp/LittleFS_Timestamp \
|
../../libraries/LittleFS/examples/LittleFS_Timestamp/LittleFS_Timestamp \
|
||||||
../../libraries/LittleFS/examples/SpeedTest/SpeedTest ; do
|
../../libraries/LittleFS/examples/SpeedTest/SpeedTest \
|
||||||
|
../../libraries/DNSServer/examples/DNSServer/DNSServer ; do
|
||||||
make -j2 D=1 FORCE32=0 $i
|
make -j2 D=1 FORCE32=0 $i
|
||||||
valgrind --leak-check=full --track-origins=yes --error-limit=no --show-leak-kinds=all --error-exitcode=999 bin/$(basename $i)/$(basename $i) -1
|
valgrind --leak-check=full --track-origins=yes --error-limit=no --show-leak-kinds=all --error-exitcode=999 bin/$(basename $i)/$(basename $i) -1
|
||||||
done
|
done
|
||||||
|
@ -163,6 +163,7 @@ static struct option options[] = {
|
|||||||
|
|
||||||
void cleanup()
|
void cleanup()
|
||||||
{
|
{
|
||||||
|
mock_stop_udp();
|
||||||
mock_stop_spiffs();
|
mock_stop_spiffs();
|
||||||
mock_stop_littlefs();
|
mock_stop_littlefs();
|
||||||
mock_stop_uart();
|
mock_stop_uart();
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
std::map<int, UdpContext*> udps;
|
static std::map<int, UdpContext*> udps;
|
||||||
|
|
||||||
void register_udp(int sock, UdpContext* udp)
|
void register_udp(int sock, UdpContext* udp)
|
||||||
{
|
{
|
||||||
@ -58,3 +58,8 @@ void check_incoming_udp()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mock_stop_udp()
|
||||||
|
{
|
||||||
|
udps.clear();
|
||||||
|
}
|
||||||
|
@ -170,6 +170,7 @@ void mockUDPSwallow(size_t copied, char* ccinbuf, size_t& ccinbufsize);
|
|||||||
|
|
||||||
class UdpContext;
|
class UdpContext;
|
||||||
void register_udp(int sock, UdpContext* udp = nullptr);
|
void register_udp(int sock, UdpContext* udp = nullptr);
|
||||||
|
void mock_stop_udp();
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user