Message ID | 20220726170920.15929-1-prestwoj@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | [01/10] manager: unregister nl80211 config watch | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
prestwoj/iwd-alpine-ci-fetch | success | Fetch PR |
prestwoj/iwd-ci-fetch | success | Fetch PR |
prestwoj/iwd-ci-gitlint | success | GitLint |
prestwoj/iwd-ci-makedistcheck | success | Make Distcheck |
prestwoj/iwd-alpine-ci-makedistcheck | success | Make Distcheck |
prestwoj/iwd-ci-build | success | Build - Configure |
prestwoj/iwd-alpine-ci-build | success | Build - Configure |
prestwoj/iwd-ci-clang | success | clang PASS |
prestwoj/iwd-ci-makecheckvalgrind | success | Make Check w/Valgrind |
prestwoj/iwd-ci-makecheck | success | Make Check |
prestwoj/iwd-alpine-ci-makecheckvalgrind | success | Make Check w/Valgrind |
prestwoj/iwd-alpine-ci-makecheck | success | Make Check |
prestwoj/iwd-ci-incremental_build | success | Incremental Build with patches |
prestwoj/iwd-alpine-ci-incremental_build | success | Incremental Build with patches |
prestwoj/iwd-ci-testrunner | success | test-runner PASS |
Hi James, On 7/26/22 12:09, James Prestwood wrote: > For consistency unregister the config watch when manager exits > --- > src/manager.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > All but patch 4 applied, thanks. Regards, -Denis
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;