Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[system] Fix bad int to bool conversion for clearCredentials #2736

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions system/inc/system_network.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ typedef WLanCredentials NetworkCredentials;
* @return 0 on success.
*/
int network_set_credentials(network_handle_t network, uint32_t flags, NetworkCredentials* creds, void* reserved);
/**
*
* @param network The network to configure the credentials.
* @param flags Flags. set to 0.
* @param creds The credentials to set. Set to NULL.
* @param reserved For future expansion. Set to NULL.
* @return true Successfully cleared the given network credentials
* @return false Failed to clear the given network credentials
*/
bool network_clear_credentials(network_handle_t network, uint32_t flags, NetworkCredentials* creds, void* reserved);

void network_setup(network_handle_t network, uint32_t flags, void* reserved);
Expand Down
2 changes: 1 addition & 1 deletion system/src/system_network_manager_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ bool network_clear_credentials(network_handle_t network, uint32_t, NetworkCreden
} else {
if_t iface;
if (!if_get_by_index(network, &iface)) {
return NetworkManager::instance()->clearConfiguration(iface);
return NetworkManager::instance()->clearConfiguration(iface) == 0;
eberseth marked this conversation as resolved.
Show resolved Hide resolved
}
}
return false;
Expand Down