Fix: Store the modem in the uuid hash
authorDenis Kenzior <denkenz@gmail.com>
Fri, 12 Feb 2010 23:57:10 +0000 (17:57 -0600)
committerDenis Kenzior <denkenz@gmail.com>
Fri, 12 Feb 2010 23:57:20 +0000 (17:57 -0600)
The modem is more useful to store than the path, particularly once we
track Aliases

plugins/hfp.c

index b60773e..5c2be83 100644 (file)
@@ -579,7 +579,7 @@ static int hfp_create_modem(const char *device)
        ofono_modem_register(modem);
 
        path = ofono_modem_get_path(modem);
-       g_hash_table_insert(uuid_hash, g_strdup(device), g_strdup(path));
+       g_hash_table_insert(uuid_hash, g_strdup(device), modem);
 
        return 0;
 
@@ -1053,7 +1053,7 @@ static int hfp_init()
        }
 
        uuid_hash = g_hash_table_new_full(g_str_hash, g_str_equal,
-                                               g_free, g_free);
+                                               g_free, NULL);
 
        adapter_address_hash = g_hash_table_new_full(g_str_hash, g_str_equal,
                                                        g_free, g_free);