---
src/connman.h | 1 +
src/rfkill.c | 2 ++
src/technology.c | 15 +++++++++++++++
3 files changed, 18 insertions(+)
diff --git a/src/connman.h b/src/connman.h
index da01215..bab013b 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -826,6 +826,7 @@ void __connman_service_save(struct connman_service
*service);
#include <connman/notifier.h>
+void __connman_technology_cleanup_rfkill(void);
int __connman_technology_init(void);
void __connman_technology_cleanup(void);
diff --git a/src/rfkill.c b/src/rfkill.c
index 960cfea..2f073a9 100644
--- a/src/rfkill.c
+++ b/src/rfkill.c
@@ -232,4 +232,6 @@ void __connman_rfkill_cleanup(void)
g_io_channel_unref(channel);
channel = NULL;
+
+ __connman_technology_cleanup_rfkill();
}
diff --git a/src/technology.c b/src/technology.c
index d80d9e6..5917c59 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -1776,6 +1776,21 @@ int __connman_technology_remove_rfkill(unsigned
int index,
return 0;
}
+gboolean find_first(gpointer key, gpointer value, gpointer user_data)
+{
+ return TRUE;
+}
+
+void __connman_technology_cleanup_rfkill(void)
+{
+ struct connman_rfkill *rfkill;
+
+ DBG("");
+
+ while (rfkill = g_hash_table_find(rfkill_list, find_first, NULL))
+ __connman_technology_remove_rfkill(rfkill->index, rfkill->type);
+}
+
int __connman_technology_init(void)
{
DBG("");
--
1.9.1
_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman