linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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

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).