Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions TESTS/network/wifi/get_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ WiFiInterface *get_interface()
{
static WiFiInterface *interface = NULL;

if (interface)
delete interface;
if (interface) {
interface->disconnect();
return interface;
}

#if MBED_CONF_APP_WIFI_DRIVER == INTERNAL
interface = new DRIVER();
Expand Down
2 changes: 1 addition & 1 deletion TESTS/network/wifi/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ utest::v1::status_t test_setup(const size_t number_of_cases) {
// Test cases
Case cases[] = {
Case("WIFI-CONSTRUCTOR", wifi_constructor),
Case("WIFI-CONNECT-NOCREDENTIALS", wifi_connect_nocredentials),
Case("WIFI-SET-CREDENTIAL", wifi_set_credential),
Case("WIFI-SET-CHANNEL", wifi_set_channel),
#if defined(MBED_CONF_APP_WIFI_UNSECURE_SSID)
Expand All @@ -72,7 +73,6 @@ Case cases[] = {
Case("WIFI-CONNECT-PARAMS-CHANNEL", wifi_connect_params_channel),
Case("WIFI-CONNECT-PARAMS-CHANNEL-FAIL", wifi_connect_params_channel_fail),
#endif
Case("WIFI-CONNECT-NOCREDENTIALS", wifi_connect_nocredentials),
#if defined(MBED_CONF_APP_WIFI_UNSECURE_SSID)
Case("WIFI-CONNECT", wifi_connect),
#endif
Expand Down