File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,10 @@ WiFiInterface *get_interface()
50
50
{
51
51
static WiFiInterface *interface = NULL ;
52
52
53
- if (interface)
54
- delete interface;
53
+ if (interface) {
54
+ interface->disconnect ();
55
+ return interface;
56
+ }
55
57
56
58
#if MBED_CONF_APP_WIFI_DRIVER == INTERNAL
57
59
interface = new DRIVER ();
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ utest::v1::status_t test_setup(const size_t number_of_cases) {
59
59
// Test cases
60
60
Case cases[] = {
61
61
Case (" WIFI-CONSTRUCTOR" , wifi_constructor),
62
+ Case (" WIFI-CONNECT-NOCREDENTIALS" , wifi_connect_nocredentials),
62
63
Case (" WIFI-SET-CREDENTIAL" , wifi_set_credential),
63
64
Case (" WIFI-SET-CHANNEL" , wifi_set_channel),
64
65
#if defined(MBED_CONF_APP_WIFI_UNSECURE_SSID)
@@ -73,7 +74,6 @@ Case cases[] = {
73
74
Case (" WIFI-CONNECT-PARAMS-CHANNEL" , wifi_connect_params_channel),
74
75
Case (" WIFI-CONNECT-PARAMS-CHANNEL-FAIL" , wifi_connect_params_channel_fail),
75
76
#endif
76
- Case (" WIFI-CONNECT-NOCREDENTIALS" , wifi_connect_nocredentials),
77
77
#if defined(MBED_CONF_APP_WIFI_UNSECURE_SSID)
78
78
Case (" WIFI-CONNECT" , wifi_connect),
79
79
#endif
You can’t perform that action at this time.
0 commit comments