From cb149fe3804f0e5723a603e2b50c4b25fbc0a52c Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Mon, 19 Aug 2019 11:11:54 -0700 Subject: [PATCH] network: add getter/setter for network_info --- src/network.c | 13 +++++++++++++ src/network.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/src/network.c b/src/network.c index c2b4feb6..e27e4314 100644 --- a/src/network.c +++ b/src/network.c @@ -473,6 +473,19 @@ const uint8_t *network_get_roaming_consortium(const struct network *network) return network->rc_ie; } +const struct network_info *network_get_info(const struct network *network) +{ + return network->info; +} + +void network_set_info(struct network *network, struct network_info *info) +{ + network->info = info; + + l_dbus_property_changed(dbus_get_bus(), network_get_path(network), + IWD_NETWORK_INTERFACE, "KnownNetwork"); +} + static inline bool __bss_is_sae(const struct scan_bss *bss, const struct ie_rsn_info *rsn) { diff --git a/src/network.h b/src/network.h index 0e8a3b7c..4ff09291 100644 --- a/src/network.h +++ b/src/network.h @@ -53,6 +53,8 @@ void network_set_nai_realms(struct network *network, char **realms); const uint8_t *network_get_hessid(const struct network *network); char **network_get_nai_realms(const struct network *network); const uint8_t *network_get_roaming_consortium(const struct network *network); +const struct network_info *network_get_info(const struct network *network); +void network_set_info(struct network *network, struct network_info *info); int network_autoconnect(struct network *network, struct scan_bss *bss); void network_connect_failed(struct network *network);