summaryrefslogtreecommitdiffstats
path: root/plugins/hfp_hf_bluez5.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2013-01-31 16:01:54 -0300
committerDenis Kenzior <denkenz@gmail.com>2013-01-31 16:03:48 -0600
commit39e72e0178985dc32fb48e3096c2beb57820b7ba (patch)
treeeb6c219d9d225f4472bb20926ed9e5736b8f1f25 /plugins/hfp_hf_bluez5.c
parentf044c6c1fae17169f58f47f95f141f53cc4fd25f (diff)
downloadofono-39e72e0178985dc32fb48e3096c2beb57820b7ba.tar.bz2
hfp_hf_bluez5: Remove BlueZ devices proxies hash
The hash table to track the devices is not necessary anymore since dynamic modem registration on NewConnection was removed.
Diffstat (limited to 'plugins/hfp_hf_bluez5.c')
-rw-r--r--plugins/hfp_hf_bluez5.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c
index d2f3abb4..2f4a89e3 100644
--- a/plugins/hfp_hf_bluez5.c
+++ b/plugins/hfp_hf_bluez5.c
@@ -64,7 +64,6 @@ struct hfp {
};
static GHashTable *modem_hash = NULL;
-static GHashTable *devices_proxies = NULL;
static GDBusClient *bluez = NULL;
static guint sco_watch = 0;
@@ -500,10 +499,6 @@ static void proxy_added(GDBusProxy *proxy, void *user_data)
if (g_str_equal(BLUEZ_DEVICE_INTERFACE, interface) == FALSE)
return;
- g_hash_table_insert(devices_proxies, g_strdup(path),
- g_dbus_proxy_ref(proxy));
- DBG("Device proxy: %s(%p)", path, proxy);
-
modem_register_from_proxy(proxy, path);
}
@@ -515,10 +510,8 @@ static void proxy_removed(GDBusProxy *proxy, void *user_data)
interface = g_dbus_proxy_get_interface(proxy);
path = g_dbus_proxy_get_path(proxy);
- if (g_str_equal(BLUEZ_DEVICE_INTERFACE, interface)) {
- g_hash_table_remove(devices_proxies, path);
- DBG("Device proxy: %s(%p)", path, proxy);
- }
+ if (g_str_equal(BLUEZ_DEVICE_INTERFACE, interface) == FALSE)
+ return;
modem = g_hash_table_lookup(modem_hash, path);
if (modem == NULL)
@@ -602,9 +595,6 @@ static int hfp_init(void)
modem_hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
NULL);
- devices_proxies = g_hash_table_new_full(g_str_hash, g_str_equal,
- g_free, (GDestroyNotify) g_dbus_proxy_unref);
-
g_dbus_client_set_connect_watch(bluez, connect_handler, NULL);
g_dbus_client_set_proxy_handlers(bluez, proxy_added, proxy_removed,
property_changed, NULL);
@@ -623,7 +613,6 @@ static void hfp_exit(void)
g_dbus_client_unref(bluez);
g_hash_table_destroy(modem_hash);
- g_hash_table_destroy(devices_proxies);
if (sco_watch > 0)
g_source_remove(sco_watch);