[PATCH BlueZ] neard: Fix reading State message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



dbus_message_iter_recurse only makese sense for container types, this is a string.

Fixes: https://github.com/bluez/bluez/issues/300
---
 plugins/neard.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/plugins/neard.c b/plugins/neard.c
index a75527148..99762482c 100644
--- a/plugins/neard.c
+++ b/plugins/neard.c
@@ -575,14 +575,12 @@ static int process_message(DBusMessage *msg, struct oob_params *remote)
 			if (process_nokia_com_bt(data, size, remote))
 				goto error;
 		} else if (strcasecmp(key, "State") == 0) {
-			DBusMessageIter array;
 			const char *state;

 			if (dbus_message_iter_get_arg_type(&value) !=
 					DBUS_TYPE_STRING)
 				goto error;

-			dbus_message_iter_recurse(&value, &array);
 			dbus_message_iter_get_basic(&value, &state);

 			remote->power_state = process_state(state);
--
2.35.1




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux