@@ -776,14 +776,21 @@ bool wifiStationEnabled(const char ** reason)
776
776
777
777
do
778
778
{
779
+ // Verify that there is at least one consumer
780
+ if (networkConsumerCount (NETWORK_WIFI_STATION) == 0 )
781
+ {
782
+ *reason = " , No consumers" ;
783
+ break ;
784
+ }
785
+
779
786
// Verify that at least one SSID value is set
780
787
if (wifiStationSsidSet == false )
781
788
{
782
789
*reason = " , SSID not available" ;
783
790
break ;
784
791
}
785
792
786
- // Determine if Wifi is begin restarted
793
+ // Determine if WiFi is begin restarted
787
794
if (wifiStationRestart)
788
795
{
789
796
wifiStationRestart = false ;
@@ -3084,10 +3091,10 @@ bool RTK_WIFI::stopStart(WIFI_ACTION_t stopping, WIFI_ACTION_t starting)
3084
3091
systemPrintf (" WiFi: RTK_WIFI::stopStart returning; %s\r\n " , enabled ? " true" : " false" );
3085
3092
if (enabled == false )
3086
3093
{
3087
- systemPrintf (" 0x%08x: _started\r\n " , _started);
3088
- systemPrintf (" 0x%08x: allOnline\r\n " , allOnline);
3089
- systemPrintf (" 0x%08x: (_started & allOnline)\r\n " , (_started & allOnline));
3090
- systemPrintf (" 0x%08x: expected\r\n " , expected);
3094
+ systemPrintf (" 0x%08x: _started\r\n " , _started);
3095
+ systemPrintf (" 0x%08x: allOnline\r\n " , allOnline);
3096
+ systemPrintf (" 0x%08x: (_started & allOnline)\r\n " , (_started & allOnline));
3097
+ systemPrintf (" 0x%08x: expected\r\n " , expected);
3091
3098
}
3092
3099
3093
3100
reportHeapNow (true );
0 commit comments