network: update several APIs to be const

This commit is contained in:
James Prestwood 2019-07-30 11:37:17 -07:00 committed by Denis Kenzior
parent e2bed192f6
commit 30fc736b62
3 changed files with 7 additions and 7 deletions

View File

@ -254,7 +254,7 @@ static bool match_rc(const void *a, const void *b)
const char *hs20_find_settings_file(struct network *network) const char *hs20_find_settings_file(struct network *network)
{ {
struct hs20_config *config; struct hs20_config *config;
uint8_t *hessid = network_get_hessid(network); const uint8_t *hessid = network_get_hessid(network);
char **nai_realms = network_get_nai_realms(network); char **nai_realms = network_get_nai_realms(network);
const uint8_t *rc_ie = network_get_roaming_consortium(network); const uint8_t *rc_ie = network_get_roaming_consortium(network);

View File

@ -555,17 +555,17 @@ void network_set_nai_realms(struct network *network, char **realms)
network->nai_realms = realms; network->nai_realms = realms;
} }
uint8_t *network_get_hessid(struct network *network) const uint8_t *network_get_hessid(const struct network *network)
{ {
return network->hessid; return network->hessid;
} }
char **network_get_nai_realms(struct network *network) char **network_get_nai_realms(const struct network *network)
{ {
return network->nai_realms; return network->nai_realms;
} }
const uint8_t *network_get_roaming_consortium(struct network *network) const uint8_t *network_get_roaming_consortium(const struct network *network)
{ {
return network->rc_ie; return network->rc_ie;
} }

View File

@ -50,9 +50,9 @@ void network_sync_psk(struct network *network);
void network_set_hessid(struct network *network, uint8_t *hessid); void network_set_hessid(struct network *network, uint8_t *hessid);
void network_set_nai_realms(struct network *network, char **realms); void network_set_nai_realms(struct network *network, char **realms);
uint8_t *network_get_hessid(struct network *network); const uint8_t *network_get_hessid(const struct network *network);
char **network_get_nai_realms(struct network *network); char **network_get_nai_realms(const struct network *network);
const uint8_t *network_get_roaming_consortium(struct network *network); const uint8_t *network_get_roaming_consortium(const struct network *network);
int network_autoconnect(struct network *network, struct scan_bss *bss); int network_autoconnect(struct network *network, struct scan_bss *bss);
void network_connect_failed(struct network *network); void network_connect_failed(struct network *network);