diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2013-01-30 13:24:15 -0300 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2013-01-30 21:32:47 -0600 |
commit | 5185980fb0782f88d5f76db15f101969cf5d0ec0 (patch) | |
tree | 1b63bf38e27c1c5556be547a9b754f01be34895f | |
parent | 3a2046c073fc293aa52c3ece0d7ea3f81f11dff5 (diff) | |
download | ofono-5185980fb0782f88d5f76db15f101969cf5d0ec0.tar.bz2 |
hfp_hf_bluez5: Improve Proxy property changed handling
This patch removes unnecessary GDBusProxy object access when property
changed is triggered. The property name and the argument iterator is
informed in the function callback.
-rw-r--r-- | plugins/hfp_hf_bluez5.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index 2aabdd2e..653829b1 100644 --- a/plugins/hfp_hf_bluez5.c +++ b/plugins/hfp_hf_bluez5.c @@ -540,7 +540,6 @@ static void property_changed(GDBusProxy *proxy, const char *name, { const char *interface, *path, *alias; struct ofono_modem *modem; - DBusMessageIter alias_iter; interface = g_dbus_proxy_get_interface(proxy); path = g_dbus_proxy_get_path(proxy); @@ -550,10 +549,10 @@ static void property_changed(GDBusProxy *proxy, const char *name, if (g_str_equal(BLUEZ_DEVICE_INTERFACE, interface) == FALSE) return; - if (g_dbus_proxy_get_property(proxy, "Alias", &alias_iter) == FALSE) + if (g_str_equal("Alias", name) == FALSE) return; - dbus_message_iter_get_basic(&alias_iter, &alias); + dbus_message_iter_get_basic(iter, &alias); modem = g_hash_table_lookup(modem_hash, path); if (modem == NULL) |