All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/10] manager: unregister nl80211 config watch
@ 2022-07-26 17:09 James Prestwood
  2022-07-26 17:09 ` [PATCH 02/10] test-runner: make developer mode optional James Prestwood
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: James Prestwood @ 2022-07-26 17:09 UTC (permalink / raw)
  To: iwd; +Cc: James Prestwood

For consistency unregister the config watch when manager exits
---
 src/manager.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/manager.c b/src/manager.c
index ca29e110..437841b3 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -49,6 +49,7 @@ static char **whitelist_filter;
 static char **blacklist_filter;
 static bool randomize;
 static bool use_default;
+static unsigned int config_watch;
 
 struct wiphy_setup_state {
 	uint32_t id;
@@ -820,8 +821,10 @@ static int manager_init(void)
 
 	pending_wiphys = l_queue_new();
 
-	if (!l_genl_family_register(nl80211, "config", manager_config_notify,
-					NULL, NULL)) {
+	config_watch = l_genl_family_register(nl80211, "config",
+						manager_config_notify,
+						NULL, NULL);
+	if (!config_watch) {
 		l_error("Registering for config notifications failed");
 		goto error;
 	}
@@ -880,6 +883,8 @@ static void manager_exit(void)
 	l_strfreev(whitelist_filter);
 	l_strfreev(blacklist_filter);
 
+	l_genl_family_unregister(nl80211, config_watch);
+
 	l_queue_destroy(pending_wiphys, wiphy_setup_state_free);
 	pending_wiphys = NULL;
 
-- 
2.34.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-07-27 16:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-26 17:09 [PATCH 01/10] manager: unregister nl80211 config watch James Prestwood
2022-07-26 17:09 ` [PATCH 02/10] test-runner: make developer mode optional James Prestwood
2022-07-26 17:09 ` [PATCH 03/10] auto-t: iwd.py: let IWD class specify developer mode James Prestwood
2022-07-26 17:09 ` [PATCH 04/10] wiphy: fix runtime error from bit shift James Prestwood
2022-07-26 20:57   ` Denis Kenzior
2022-07-27 16:00     ` James Prestwood
2022-07-26 17:09 ` [PATCH 05/10] scan: make scan_freq_set const in scan_passive James Prestwood
2022-07-26 17:09 ` [PATCH 06/10] util: make scan_freq_set_get_bands const James Prestwood
2022-07-26 17:09 ` [PATCH 07/10] util: add scan_freq_set_subtract James Prestwood
2022-07-26 17:09 ` [PATCH 08/10] wiphy: add disabled_freqs list James Prestwood
2022-07-26 17:09 ` [PATCH 09/10] wiphy: constrain scan set by disabled frequencies James Prestwood
2022-07-26 17:09 ` [PATCH 10/10] nl80211util: add nested attribute support James Prestwood
2022-07-26 20:52 ` [PATCH 01/10] manager: unregister nl80211 config watch Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.