From: Johan Hedberg <johan.hedberg@nokia.com>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] D-BUS fixes for hcid
Date: Wed, 16 Jun 2004 14:27:02 +0300 [thread overview]
Message-ID: <20040616112702.GA898@kone> (raw)
[-- Attachment #1: Type: text/plain, Size: 625 bytes --]
Hi,
There are some problems with the current D-BUS pin-request handling in
hcid. The attached patch tries to address those.
Also, the bluez-pin package will need to provide a D-BUS service file
(bluez.service) so that the D-BUS daemon can activate it when needed.
This file goes usually in /usr/lib/dbus-1.0/services and it's contents
should be something like the following:
[D-BUS Service]
Name=org.bluez.PinAgent
Exec=/usr/bin/bluez-pin
You'll also need the following line in /etc/dbus-1/system.conf (at least
the debian package of D-BUS doesn't have it):
<servicedir>/usr/lib/dbus-1.0/services</servicedir>
br,
Johan
[-- Attachment #2: hcid-dbus.diff --]
[-- Type: text/plain, Size: 687 bytes --]
--- dbus.c.orig 2004-06-16 13:57:51.000000000 +0300
+++ dbus.c 2004-06-16 14:05:51.000000000 +0300
@@ -75,7 +75,8 @@
message = dbus_pending_call_get_reply(call);
- if (dbus_message_is_error(message, WRONG_ARGS_ERROR))
+ if (message == NULL ||
+ dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_ERROR)
goto error;
dbus_message_iter_init(message, &iter);
@@ -131,6 +132,8 @@
dbus_message_iter_append_byte_array(&iter,
(unsigned char *) &ci->bdaddr, sizeof(ci->bdaddr));
+ dbus_message_set_auto_activation(message, TRUE);
+
if (dbus_connection_send_with_reply(connection, message,
&pending, TIMEOUT) == FALSE) {
syslog(LOG_ERR, "D-BUS send failed");
next reply other threads:[~2004-06-16 11:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-16 11:27 Johan Hedberg [this message]
2004-06-16 11:37 ` [Bluez-devel] D-BUS fixes for hcid Marcel Holtmann
2004-06-16 11:57 ` Johan Hedberg
2004-06-16 12:05 ` Johan Hedberg
2004-06-16 12:18 ` Marcel Holtmann
2004-06-16 12:45 ` Johan Hedberg
2004-06-16 13:06 ` Marcel Holtmann
2004-06-16 13:46 ` Johan Hedberg
2004-06-16 13:53 ` Marcel Holtmann
2004-06-16 13:58 ` Achim Bohnet
2004-06-16 14:18 ` Johan Hedberg
2004-06-16 23:06 ` Marcel Holtmann
2004-06-17 9:48 ` Johan Hedberg
2004-06-17 12:05 ` Marcel Holtmann
2004-06-17 7:27 ` Sjoerd Simons
2004-06-18 7:30 ` Achim Bohnet
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=20040616112702.GA898@kone \
--to=johan.hedberg@nokia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox