diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2013-05-06 15:20:51 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-05-08 10:12:08 +0300 |
commit | 88daad940280ce2945bfd480ebc993dcad044360 (patch) | |
tree | df466228a88fc6f7512f90018078e4c5d0f02cd4 /plugins | |
parent | b387262a5309731a3d2ecc515cba577b30dd84f6 (diff) |
neard: Fix checking for unknown carrier power state
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.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/neard.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/neard.c b/plugins/neard.c index f46e20e5e..dfe4f233c 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) { |