summaryrefslogtreecommitdiff
path: root/src/bluetooth.c
diff options
context:
space:
mode:
authorArron Wang <arron.wang@intel.com>2013-04-17 10:25:31 +0800
committerArron Wang <arron.wang@intel.com>2013-04-17 10:37:31 +0800
commit4190ac1591d78cbe844dab51816c83086a118d82 (patch)
tree12bf90d2a715091e484d0db432dd67b8bc31f01d /src/bluetooth.c
parentebac91960564186baa4099454f1639fc8dd453ea (diff)
downloadneard-4190ac1591d78cbe844dab51816c83086a118d82.tar.gz
neard-4190ac1591d78cbe844dab51816c83086a118d82.tar.bz2
neard-4190ac1591d78cbe844dab51816c83086a118d82.zip
bluetooth: Get name value from right message iterator
We need to get name value from var instead of the container iter else it may also cause neard crash: process 1044: type variant 118 not a basic type 0 0xb7fe1424 in __kernel_vsyscall () 1 0xb7bcfcc1 in raise () from /lib/libc.so.6 2 0xb7bd30ee in abort () from /lib/libc.so.6 3 0xb7da5045 in _dbus_abort () from /usr/lib/libdbus-1.so.3 4 0xb7d99f86 in _dbus_warn_check_failed () from /usr/lib/libdbus-1.so.3 5 0xb7d9bc9c in _dbus_marshal_read_basic () from /usr/lib/libdbus-1.so.3 6 0xb7d84e0f in _dbus_type_reader_read_basic () from /usr/lib/libdbus-1.so.3 7 0xb7d89f0b in dbus_message_iter_get_basic () from /usr/lib/libdbus-1.so.3 8 0x0806b638 in bt_adapter_property_changed (conn=0x80814c8, message=0x8081870, user_data=0x0) at src/bluetooth.c:445 Change-Id: I1f3339e7f11fc1dc671f092a5d653c1cf38a54a3
Diffstat (limited to 'src/bluetooth.c')
-rw-r--r--src/bluetooth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bluetooth.c b/src/bluetooth.c
index 0207919..28df08c 100644
--- a/src/bluetooth.c
+++ b/src/bluetooth.c
@@ -442,7 +442,7 @@ static gboolean bt_adapter_property_changed(DBusConnection *conn,
if (dbus_message_iter_get_arg_type(&var) != DBUS_TYPE_STRING)
return TRUE;
- dbus_message_iter_get_basic(&iter, &name);
+ dbus_message_iter_get_basic(&var, &name);
g_free(bt_def_oob_data.bt_name);
bt_def_oob_data.bt_name = g_strdup(name);