Skip to content

Commit

Permalink
[linux] Fix the device failed to reconnect wifi after power cycle (pr…
Browse files Browse the repository at this point in the history
…oject-chip#23504)

* [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 adbridge committed Nov 18, 2022
1 parent 7c7da74 commit 0ddbe5a
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 0ddbe5a

Please sign in to comment.