network: Make network_settings_close private

This commit is contained in:
Denis Kenzior 2016-09-19 17:04:51 -05:00
parent a239b49707
commit 12fca8b7f7
2 changed files with 9 additions and 10 deletions

View File

@ -74,6 +74,15 @@ static bool network_settings_load(struct network *network)
return network->settings != NULL;
}
static void network_settings_close(struct network *network)
{
if (!network->settings)
return;
l_settings_free(network->settings);
network->settings = NULL;
}
static int timespec_compare(const void *a, const void *b, void *user_data)
{
const struct network_info *ni_a = a;
@ -336,15 +345,6 @@ void network_sync_psk(struct network *network)
storage_network_sync("psk", network->info->ssid, network->settings);
}
void network_settings_close(struct network *network)
{
if (!network->settings)
return;
l_settings_free(network->settings);
network->settings = NULL;
}
int network_autoconnect(struct network *network, struct scan_bss *bss)
{
struct wiphy *wiphy = device_get_wiphy(network->device);

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);
void network_settings_close(struct network *network);
void network_sync_psk(struct network *network);
int network_autoconnect(struct network *network, struct scan_bss *bss);