Skip to content

Commit e85e59a

Browse files
author
Eric Berseth
committed
[system] Fix bad int to bool conversion for clearCredentials
1 parent 1b02456 commit e85e59a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

system/inc/system_network.h

+9
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,15 @@ typedef WLanCredentials NetworkCredentials;
102102
* @return 0 on success.
103103
*/
104104
int network_set_credentials(network_handle_t network, uint32_t flags, NetworkCredentials* creds, void* reserved);
105+
/**
106+
*
107+
* @param network The network to configure the credentials.
108+
* @param flags Flags. set to 0.
109+
* @param creds The credentials to set. Should not be NULL.
110+
* @param reserved For future expansion. Set to NULL.
111+
* @return true Successfully cleared the given network credentials
112+
* @return false Failed to clear the given network credentials
113+
*/
105114
bool network_clear_credentials(network_handle_t network, uint32_t flags, NetworkCredentials* creds, void* reserved);
106115

107116
void network_setup(network_handle_t network, uint32_t flags, void* reserved);

system/src/system_network_manager_api.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ bool network_clear_credentials(network_handle_t network, uint32_t, NetworkCreden
438438
} else {
439439
if_t iface;
440440
if (!if_get_by_index(network, &iface)) {
441-
return NetworkManager::instance()->clearConfiguration(iface);
441+
return NetworkManager::instance()->clearConfiguration(iface) == 0;
442442
}
443443
}
444444
return false;

0 commit comments

Comments
 (0)