All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] hcid: memory alignment problems on arm
Date: Thu, 22 Sep 2005 11:35:21 +0200	[thread overview]
Message-ID: <1127381721.5344.4.camel@blade> (raw)
In-Reply-To: <74d0deb305092202185bd2308b@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 373 bytes --]

Hi Philipp,

> On 9/21/05, Marcel Holtmann <marcel@holtmann.org> wrote:
> > the patch looks good, but you must redo it against the latest CVS. I
> > removed the compat code for the D-Bus 0.23 API.
> 
> Thanks, I have attached an updated patch against CVS.

is the attached patch also working for you? I think it is better to use
the D-Bus specific types.

Regards

Marcel


[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 1381 bytes --]

Index: hcid/dbus.c
===================================================================
RCS file: /cvsroot/bluez/utils/hcid/dbus.c,v
retrieving revision 1.16
diff -u -r1.16 dbus.c
--- hcid/dbus.c	15 Sep 2005 08:07:53 -0000	1.16
+++ hcid/dbus.c	22 Sep 2005 09:33:58 -0000
@@ -124,6 +124,7 @@
 	DBusPendingCall *pending = NULL;
 	struct pin_request *req;
 	uint8_t *addr = (uint8_t *) &ci->bdaddr;
+	dbus_uint32_t out = ci->out;
 
 	message = dbus_message_new_method_call(SERVICE_NAME, PATH_NAME,
 						INTERFACE_NAME, REQUEST_NAME);
@@ -136,7 +137,7 @@
 	req->dev = dev;
 	bacpy(&req->bda, &ci->bdaddr);
 
-	dbus_message_append_args(message, DBUS_TYPE_BOOLEAN, &ci->out,
+	dbus_message_append_args(message, DBUS_TYPE_BOOLEAN, &out,
 			DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE,
 			&addr, sizeof(bdaddr_t), DBUS_TYPE_INVALID);
 
@@ -233,6 +234,8 @@
 {
 	DBusMessage *message;
 	char *local_addr, *peer_addr;
+	dbus_uint32_t tmp_class;
+	dbus_int32_t tmp_rssi = rssi;
 	bdaddr_t tmp;
 
 	baswap(&tmp, local); local_addr = batostr(&tmp);
@@ -248,8 +251,8 @@
 	dbus_message_append_args(message,
 					DBUS_TYPE_STRING, &local_addr,
 					DBUS_TYPE_STRING, &peer_addr,
-					DBUS_TYPE_UINT32, &class,
-					DBUS_TYPE_INT32, &rssi,
+					DBUS_TYPE_UINT32, &tmp_class,
+					DBUS_TYPE_INT32, &tmp_rssi,
 					DBUS_TYPE_INVALID);
 
 	if (dbus_connection_send(connection, message, NULL) == FALSE) {

  reply	other threads:[~2005-09-22  9:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-21 10:55 [Bluez-devel] hcid: memory alignment problems on arm pHilipp Zabel
2005-09-21 20:53 ` Marcel Holtmann
2005-09-22  9:18   ` pHilipp Zabel
2005-09-22  9:35     ` Marcel Holtmann [this message]
2005-09-22  9:43       ` Marcel Holtmann
2005-09-22 11:24         ` pHilipp Zabel

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=1127381721.5344.4.camel@blade \
    --to=marcel@holtmann.org \
    --cc=bluez-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.