linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] neard: Fix checking for unknown carrier power state
@ 2013-05-06 13:20 Szymon Janc
  2013-05-06 13:20 ` [PATCH 2/2] neard: Fix reading local OOB data when adapter is not powered Szymon Janc
  2013-05-08  7:13 ` [PATCH 1/2] neard: Fix checking for unknown carrier power state Johan Hedberg
  0 siblings, 2 replies; 3+ messages in thread
From: Szymon Janc @ 2013-05-06 13:20 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Samuel Ortiz, Szymon Janc

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-08  7:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-06 13:20 [PATCH 1/2] neard: Fix checking for unknown carrier power state Szymon Janc
2013-05-06 13:20 ` [PATCH 2/2] neard: Fix reading local OOB data when adapter is not powered Szymon Janc
2013-05-08  7:13 ` [PATCH 1/2] neard: Fix checking for unknown carrier power state Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).