From: pHilipp Zabel <philipp.zabel@gmail.com>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] hcid: memory alignment problems on arm
Date: Wed, 21 Sep 2005 12:55:11 +0200 [thread overview]
Message-ID: <74d0deb3050921035545e2a33d@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 193 bytes --]
Hi!
hcid causes alignment traps on arm architecture with the dbus part enabled.
I worked around this with the attached patch.
Can anybody help me to do this the right way?
--
Philipp
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: hcid-alignment-fix.patch --]
[-- Type: text/x-patch; name="hcid-alignment-fix.patch", Size: 1195 bytes --]
--- bluez-utils-2.20/hcid/dbus.c.orig 2005-09-21 11:27:26 +0200
+++ bluez-utils-2.20/hcid/dbus.c 2005-09-21 11:27:35 +0200
@@ -120,6 +121,7 @@
DBusMessage *message;
#ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC
uint8_t *addr = (uint8_t *) &ci->bdaddr;
+ uint32_t ci_out = ci->out;
#else
DBusMessageIter iter;
#endif
@@ -138,7 +140,7 @@
bacpy(&req->bda, &ci->bdaddr);
#ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC
- dbus_message_append_args(message, DBUS_TYPE_BOOLEAN, &ci->out,
+ dbus_message_append_args(message, DBUS_TYPE_BOOLEAN, &ci_out,
DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE,
&addr, sizeof(bdaddr_t), DBUS_TYPE_INVALID);
#else
@@ -261,6 +263,8 @@
DBusMessage *message;
#ifndef HAVE_DBUS_MESSAGE_ITER_GET_BASIC
DBusMessageIter iter;
+#else
+ int32_t tmp_rssi = rssi;
#endif
char *local_addr, *peer_addr;
bdaddr_t tmp;
@@ -276,11 +280,12 @@
}
#ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC
+
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_INT32, &tmp_rssi,
DBUS_TYPE_INVALID);
#else
dbus_message_append_iter_init(message, &iter);
next reply other threads:[~2005-09-21 10:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-21 10:55 pHilipp Zabel [this message]
2005-09-21 20:53 ` [Bluez-devel] hcid: memory alignment problems on arm Marcel Holtmann
2005-09-22 9:18 ` pHilipp Zabel
2005-09-22 9:35 ` Marcel Holtmann
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=74d0deb3050921035545e2a33d@mail.gmail.com \
--to=philipp.zabel@gmail.com \
--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.