Skip to content

Commit 2212809

Browse files
yufengwangcapull[bot]
authored andcommitted
[linux] Fix the device failed to reconnect wifi after power cycle (#23504)
* [linux] Fix the device failed to reconnect wifi after power cycle * Add return to prevent indent in the following code
1 parent cf79f1d commit 2212809

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/platform/Linux/ConnectivityManagerImpl.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,24 @@ void ConnectivityManagerImpl::_ConnectWiFiNetworkAsyncCallback(GObject * source_
10601060
}
10611061
mpConnectCallback = nullptr;
10621062
});
1063+
1064+
return;
1065+
}
1066+
1067+
GError * gerror = nullptr;
1068+
1069+
result = wpa_fi_w1_wpa_supplicant1_interface_call_save_config_sync(mWpaSupplicant.iface, nullptr, &gerror);
1070+
if (result)
1071+
{
1072+
ChipLogProgress(DeviceLayer, "wpa_supplicant: save config succeeded!");
10631073
}
1074+
else
1075+
{
1076+
ChipLogProgress(DeviceLayer, "wpa_supplicant: failed to save config: %s", gerror ? gerror->message : "unknown error");
1077+
}
1078+
1079+
if (gerror != nullptr)
1080+
g_error_free(gerror);
10641081
}
10651082
}
10661083

0 commit comments

Comments
 (0)