network: Make network_load_settings static

This commit is contained in:
Denis Kenzior 2016-09-19 17:03:51 -05:00
parent 69ea4db15c
commit a239b49707
2 changed files with 16 additions and 17 deletions

View File

@ -58,6 +58,22 @@ struct network {
static struct l_queue *networks = NULL;
static bool network_settings_load(struct network *network)
{
const char *strtype;
if (network->settings)
return true;
strtype = security_to_str(network_get_security(network));
if (!strtype)
return false;
network->settings = storage_network_open(strtype, network->info->ssid);
return network->settings != NULL;
}
static int timespec_compare(const void *a, const void *b, void *user_data)
{
const struct network_info *ni_a = a;
@ -305,22 +321,6 @@ struct l_settings *network_get_settings(const struct network *network)
return network->settings;
}
bool network_settings_load(struct network *network)
{
const char *strtype;
if (network->settings)
return true;
strtype = security_to_str(network_get_security(network));
if (!strtype)
return false;
network->settings = storage_network_open(strtype, network->info->ssid);
return network->settings != NULL;
}
void network_sync_psk(struct network *network)
{
char *hex;

View File

@ -44,7 +44,6 @@ const unsigned char *network_get_psk(const struct network *network);
int network_get_signal_strength(const struct network *network);
struct l_settings *network_get_settings(const struct network *network);
bool network_settings_load(struct network *network);
void network_settings_close(struct network *network);
void network_sync_psk(struct network *network);