Thread (3 messages) 3 messages, 2 authors, 2013-05-08
STALE4828d

[PATCH 1/2] neard: Fix checking for unknown carrier power state

From: Szymon Janc <hidden>
Date: 2013-05-06 13:20:51
Subsystem: the rest · Maintainer: Linus Torvalds

Message might not contain State field and CPS needs to be set to
unknown before processing message from neard. This fix processing
RequestOOB called without parameters.
---
 plugins/neard.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/plugins/neard.c b/plugins/neard.c
index f46e20e..dfe4f23 100644
--- a/plugins/neard.c
+++ b/plugins/neard.c
@@ -527,6 +527,9 @@ static int process_message(DBusMessage *msg, struct oob_params *remote)
 	if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY)
 		return -EINVAL;
 
+	/* set CPS to unknown in case State was not provided */
+	remote->power_state = CPS_UNKNOWN;
+
 	dbus_message_iter_recurse(&iter, &dict);
 
 	while (dbus_message_iter_get_arg_type(&dict) == DBUS_TYPE_DICT_ENTRY) {
-- 
1.8.2.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help