3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-29 13:59:24 +01:00

network: Move network_info_free to knownnetworks.c

This commit is contained in:
Denis Kenzior 2019-08-09 02:33:50 -05:00
parent 37f71fe4e4
commit 0d7f591d4f
3 changed files with 9 additions and 10 deletions

View File

@ -46,6 +46,15 @@ static struct l_queue *known_networks;
static size_t num_known_hidden_networks; static size_t num_known_hidden_networks;
static struct l_dir_watch *storage_dir_watch; static struct l_dir_watch *storage_dir_watch;
static void network_info_free(void *data)
{
struct network_info *network = data;
l_queue_destroy(network->known_frequencies, l_free);
l_free(network);
}
static int connected_time_compare(const void *a, const void *b, void *user_data) static int connected_time_compare(const void *a, const void *b, void *user_data)
{ {
const struct network_info *ni_a = a; const struct network_info *ni_a = a;

View File

@ -247,15 +247,6 @@ bool network_rankmod(const struct network *network, double *rankmod)
return true; return true;
} }
void network_info_free(void *data)
{
struct network_info *network = data;
l_queue_destroy(network->known_frequencies, l_free);
l_free(network);
}
struct network *network_create(struct station *station, const char *ssid, struct network *network_create(struct station *station, const char *ssid,
enum security security) enum security security)
{ {

View File

@ -90,4 +90,3 @@ struct network_info *network_info_add_known(const char *ssid,
enum security security); enum security security);
void network_info_forget_known(struct network_info *network); void network_info_forget_known(struct network_info *network);
bool network_info_match(const void *a, const void *b); bool network_info_match(const void *a, const void *b);
void network_info_free(void *data);