[PATCH v3 4/8] vpn: Unregister agent driver before removing provider

Jukka Rissanen jukka.rissanen at linux.intel.com
Tue Sep 10 04:38:45 PDT 2013


Agent might have pending requests from provider so we must
unregister before cleaning up provider hash.
---
 vpn/vpn-provider.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c
index 1769e53..96ea442 100644
--- a/vpn/vpn-provider.c
+++ b/vpn/vpn-provider.c
@@ -2649,12 +2649,12 @@ void __vpn_provider_cleanup(void)
 {
 	DBG("");
 
+	connman_agent_driver_unregister(&agent_driver);
+
 	g_hash_table_foreach(provider_hash, clean_provider, NULL);
 
 	g_hash_table_destroy(provider_hash);
 	provider_hash = NULL;
 
-	connman_agent_driver_unregister(&agent_driver);
-
 	dbus_connection_unref(connection);
 }
-- 
1.7.11.7




More information about the connman mailing list