From: "Frédéric Danis" <frederic.danis@linux.intel.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 7/8] dbusoob: Set device class in device object
Date: Thu, 15 Nov 2012 18:31:40 +0100 [thread overview]
Message-ID: <1353000701-16605-7-git-send-email-frederic.danis@linux.intel.com> (raw)
In-Reply-To: <1353000701-16605-1-git-send-email-frederic.danis@linux.intel.com>
---
plugins/dbusoob.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/plugins/dbusoob.c b/plugins/dbusoob.c
index b59ffa8..e58b353 100644
--- a/plugins/dbusoob.c
+++ b/plugins/dbusoob.c
@@ -191,7 +191,9 @@ static gboolean parse_data(DBusMessageIter *data, struct oob_data *remote_data)
return TRUE;
}
-static gboolean store_data(struct btd_adapter *adapter, struct oob_data *data)
+static gboolean store_data(struct btd_adapter *adapter,
+ struct btd_device *device,
+ struct oob_data *data)
{
bdaddr_t bdaddr;
@@ -204,8 +206,7 @@ static gboolean store_data(struct btd_adapter *adapter, struct oob_data *data)
}
if (data->class)
- write_remote_class(adapter_get_address(adapter), &bdaddr,
- data->class);
+ device_set_class(device, data->class);
if (data->name)
btd_event_remote_name(adapter_get_address(adapter), &bdaddr,
@@ -255,7 +256,7 @@ static DBusMessage *add_remote_data(DBusConnection *conn, DBusMessage *msg,
if (!parse_data(&data, &remote_data))
return btd_error_invalid_args(msg);
- if (!store_data(adapter, &remote_data))
+ if (!store_data(adapter, device, &remote_data))
return btd_error_failed(msg, "Request failed");
reply = dbus_message_new_method_return(msg);
--
1.7.9.5
next prev parent reply other threads:[~2012-11-15 17:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-15 17:31 [PATCH 1/8] device: Remove storage path #defines Frédéric Danis
2012-11-15 17:31 ` [PATCH 2/8] device: Device_remove_stored removes device directory Frédéric Danis
2012-11-15 17:31 ` [PATCH 3/8] adapter: Convert storage classes Frédéric Danis
2012-11-15 17:31 ` [PATCH 4/8] device: Retrieve class from storage Frédéric Danis
2012-11-15 17:31 ` [PATCH 5/8] adapter: Set device class in device object Frédéric Danis
2012-11-15 17:31 ` [PATCH 6/8] event: " Frédéric Danis
2012-11-15 17:31 ` Frédéric Danis [this message]
2012-11-15 17:31 ` [PATCH 8/8] neard: " Frédéric Danis
2012-11-16 8:24 ` Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1353000701-16605-7-git-send-email-frederic.danis@linux.intel.com \
--to=frederic.danis@linux.intel.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).