From: Alok Barsode <alok.bars...@nokia.com>

---
 src/technology.c |   22 ++++------------------
 1 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/src/technology.c b/src/technology.c
index 6ac591c..5ce2ce3 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -31,7 +31,6 @@
 
 static DBusConnection *connection;
 
-static GHashTable *device_table;
 static GSList *technology_list = NULL;
 
 enum connman_technology_state {
@@ -590,13 +589,6 @@ void __connman_technology_remove_interface(enum 
connman_service_type type,
        technology_put(technology);
 }
 
-static void unregister_technology(gpointer data)
-{
-       struct connman_technology *technology = data;
-
-       technology_put(technology);
-}
-
 int __connman_technology_add_device(struct connman_device *device)
 {
        struct connman_technology *technology;
@@ -610,8 +602,6 @@ int __connman_technology_add_device(struct connman_device 
*device)
        if (technology == NULL)
                return -ENXIO;
 
-       g_hash_table_insert(device_table, device, technology);
-
        if (technology->state == CONNMAN_TECHNOLOGY_STATE_OFFLINE)
                goto done;
 
@@ -630,10 +620,13 @@ done:
 int __connman_technology_remove_device(struct connman_device *device)
 {
        struct connman_technology *technology;
+       enum connman_service_type type;
 
        DBG("device %p", device);
 
-       technology = g_hash_table_lookup(device_table, device);
+       type = __connman_device_get_service_type(device);
+
+       technology = technology_get(type);
        if (technology == NULL)
                return -ENXIO;
 
@@ -644,8 +637,6 @@ int __connman_technology_remove_device(struct 
connman_device *device)
                state_changed(technology);
        }
 
-       g_hash_table_remove(device_table, device);
-
        return 0;
 }
 
@@ -870,9 +861,6 @@ int __connman_technology_init(void)
 
        connection = connman_dbus_get_connection();
 
-       device_table = g_hash_table_new_full(g_direct_hash, g_direct_equal,
-                                               NULL, unregister_technology);
-
        return 0;
 }
 
@@ -880,7 +868,5 @@ void __connman_technology_cleanup(void)
 {
        DBG("");
 
-       g_hash_table_destroy(device_table);
-
        dbus_connection_unref(connection);
 }
-- 
1.7.0.4

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to