diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2005-09-22 12:09:16 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2005-09-22 12:09:16 +0000 |
commit | c5d50b815bb5a30ad1d9b8f59fa33115513845e1 (patch) | |
tree | 1dde665be9e54b0104415e2818149cbb0eaa291a /hcid/dbus.c | |
parent | 0113203bf3424c0645046b962d81fe85ede308f1 (diff) |
Fix memory alignment problem
Diffstat (limited to 'hcid/dbus.c')
-rw-r--r-- | hcid/dbus.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/hcid/dbus.c b/hcid/dbus.c index df520316..39daf783 100644 --- a/hcid/dbus.c +++ b/hcid/dbus.c @@ -124,6 +124,7 @@ void hcid_dbus_request_pin(int dev, struct hci_conn_info *ci) DBusPendingCall *pending = NULL; struct pin_request *req; uint8_t *addr = (uint8_t *) &ci->bdaddr; + dbus_bool_t out = ci->out; message = dbus_message_new_method_call(SERVICE_NAME, PATH_NAME, INTERFACE_NAME, REQUEST_NAME); @@ -136,7 +137,7 @@ void hcid_dbus_request_pin(int dev, struct hci_conn_info *ci) 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 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class, i { DBusMessage *message; char *local_addr, *peer_addr; + dbus_uint32_t tmp_class = class; + dbus_int32_t tmp_rssi = rssi; bdaddr_t tmp; baswap(&tmp, local); local_addr = batostr(&tmp); @@ -248,8 +251,8 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class, i 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) { |