* [Bluez-devel] [DBUS PATCH] BondingRemoved signal
@ 2006-02-22 18:48 Claudio Takahasi
2006-02-22 21:41 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Claudio Takahasi @ 2006-02-22 18:48 UTC (permalink / raw)
To: bluez-devel
[-- Attachment #1: Type: text/plain, Size: 390 bytes --]
Hi Marcel,
here is the patch to send the BondingRemoved signal.
Considering that we will need review the condition to send the signal
I put a tag "FIXME:" to track this issue, but feel free to remove if
you think that this is not relevant.
Regards,
Claudio.
--
---------------------------------------------------------
Claudio Takahasi
Instituto Nokia de Tecnologia - INdT
[-- Attachment #2: bonding_removed01.patch --]
[-- Type: text/x-patch, Size: 1148 bytes --]
Index: hcid/dbus-device.c
===================================================================
RCS file: /cvsroot/bluez/utils/hcid/dbus-device.c,v
retrieving revision 1.7
diff -u -r1.7 dbus-device.c
--- hcid/dbus-device.c 22 Feb 2006 17:43:28 -0000 1.7
+++ hcid/dbus-device.c 22 Feb 2006 18:40:59 -0000
@@ -792,8 +792,10 @@
static DBusMessage* handle_dev_remove_bonding_req(DBusMessage *msg, void *data)
{
struct hci_dbus_data *dbus_data = data;
+ DBusConnection *connection = get_dbus_connection();
DBusMessageIter iter;
DBusMessage *reply;
+ DBusMessage *signal;
char filename[PATH_MAX + 1];
char addr[18], *addr_ptr;
struct hci_conn_info_req *cr;
@@ -813,6 +815,16 @@
/* Delete the link key from storage */
textfile_del(filename, addr_ptr);
+
+ /* FIXME: which condition must be verified before send the signal */
+ signal = dev_signal_factory(dbus_data->dev_id, DEV_SIG_BONDING_REMOVED,
+ DBUS_TYPE_STRING, &addr_ptr,
+ DBUS_TYPE_INVALID);
+ if (signal) {
+ dbus_connection_send(connection, signal, NULL);
+ dbus_connection_flush(connection);
+ dbus_message_unref(signal);
+ }
str2ba(addr_ptr, &bdaddr);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Bluez-devel] [DBUS PATCH] BondingRemoved signal
2006-02-22 18:48 [Bluez-devel] [DBUS PATCH] BondingRemoved signal Claudio Takahasi
@ 2006-02-22 21:41 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2006-02-22 21:41 UTC (permalink / raw)
To: bluez-devel
Hi Claudio,
> here is the patch to send the BondingRemoved signal.
> Considering that we will need review the condition to send the signal
> I put a tag "FIXME:" to track this issue, but feel free to remove if
> you think that this is not relevant.
I moved the signal after the HCI disconnect command.
Regards
Marcel
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-22 21:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-22 18:48 [Bluez-devel] [DBUS PATCH] BondingRemoved signal Claudio Takahasi
2006-02-22 21:41 ` Marcel Holtmann
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).