Skip to content

Commit

Permalink
[linux] Fix the device failed to reconnect wifi after power cycle (#2…
Browse files Browse the repository at this point in the history
…3504)

* [linux] Fix the device failed to reconnect wifi after power cycle

* Add return to prevent indent in the following code
  • Loading branch information
yufengwangca authored and pull[bot] committed Jul 11, 2023
1 parent 8dd95b6 commit 2386317
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/platform/Linux/ConnectivityManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,24 @@ void ConnectivityManagerImpl::_ConnectWiFiNetworkAsyncCallback(GObject * source_
}
mpConnectCallback = nullptr;
});

return;
}

GError * gerror = nullptr;

result = wpa_fi_w1_wpa_supplicant1_interface_call_save_config_sync(mWpaSupplicant.iface, nullptr, &gerror);
if (result)
{
ChipLogProgress(DeviceLayer, "wpa_supplicant: save config succeeded!");
}
else
{
ChipLogProgress(DeviceLayer, "wpa_supplicant: failed to save config: %s", gerror ? gerror->message : "unknown error");
}

if (gerror != nullptr)
g_error_free(gerror);
}
}

Expand Down

0 comments on commit 2386317

Please sign in to comment.