diff options
author | Arron Wang <arron.wang@intel.com> | 2013-04-22 17:19:23 +0800 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-04-29 17:36:41 +0200 |
commit | 77d2717c4bfa6dfb7fe3915af045589332335475 (patch) | |
tree | 8d8e0626478b37a92d860d676e6cd546a6c4d1d4 | |
parent | 3365ffe98e856b87ce337c103153271e24dcef9f (diff) | |
download | neard-77d2717c4bfa6dfb7fe3915af045589332335475.tar.gz neard-77d2717c4bfa6dfb7fe3915af045589332335475.tar.bz2 neard-77d2717c4bfa6dfb7fe3915af045589332335475.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
-rw-r--r-- | src/bluetooth.c | 2 |
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); |