Skip to content

Commit

Permalink
[system] Fix bad int to bool conversion for clearCredentials
Browse files Browse the repository at this point in the history
  • Loading branch information
eberseth committed Feb 9, 2024
1 parent 1b02456 commit e85e59a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
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. Should not be 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;
}
}
return false;
Expand Down

0 comments on commit e85e59a

Please sign in to comment.