Skip to contentSkip to conversation

Fixing bluetoothd to avoid passing device descriptor

PATCH In review [email protected] 2 participants 2 messages Jul 7, 2009 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fixing bluetoothd to avoid passing device descriptor

From: Alok Barsode <[email protected]>

---
 plugins/hal.c  |    4 +-
 src/adapter.c  |  131 ++++++++++++++++++++++++++++++++++++++++++--------------
 src/adapter.h  |    5 ++-
 src/dbus-hci.c |   45 +------------------
 src/dbus-hci.h |    4 --
 5 files changed, 107 insertions(+), 82 deletions(-)
plugins/hal.c +2 -2
index 5b7e4b2..6815f28 100644
@@ -90,9 +90,9 @@ static void formfactor_reply(DBusPendingCall *call, void *user_data)
 	/* Computer major class */
 	debug("Setting 0x%06x for major/minor device class", (1 << 8) | minor);
 
-	set_major_and_minor_class(dd, cls, 0x01, minor);
-
 	hci_close_dev(dd);
+
+	set_major_and_minor_class(adapter, 0x01, minor);
 }
 
 static DBusConnection *connection;
src/adapter.c +99 -32

236 lines not on this page · raw message

src/adapter.h +4 -1
index ff599da..b4a3989 100644
@@ -81,7 +81,7 @@ int adapter_get_class(struct btd_adapter *adapter, uint8_t *cls);
 
 int adapter_set_class(struct btd_adapter *adapter, uint8_t *cls);
 
-int adapter_update_ssp_mode(struct btd_adapter *adapter, int dd, uint8_t mode);
+int adapter_update_ssp_mode(struct btd_adapter *adapter, uint8_t mode);
 
 struct btd_device *adapter_get_device(DBusConnection *conn,
 				struct btd_adapter *adapter, const char *address);
@@ -131,6 +131,9 @@ gboolean adapter_has_discov_sessions(struct btd_adapter *adapter);
 
 struct btd_adapter *btd_adapter_ref(struct btd_adapter *adapter);
 void btd_adapter_unref(struct btd_adapter *adapter);
+int set_major_and_minor_class(struct btd_adapter *adapter,
+						uint8_t major, uint8_t minor);
+
 
 struct btd_adapter_driver {
 	const char *name;
src/dbus-hci.c +2 -43

58 lines not on this page · raw message

src/dbus-hci.h +0 -4
index ff8961a..d6d9a11 100644
@@ -47,10 +47,6 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
 
 DBusMessage *new_authentication_return(DBusMessage *msg, uint8_t status);
 
-int set_service_classes(int dd, const uint8_t *cls, uint8_t value);
-int set_major_and_minor_class(int dd, const uint8_t *cls,
-						uint8_t major, uint8_t minor);
-
 const char *class_to_icon(uint32_t class);
 
 void set_dbus_connection(DBusConnection *conn);
Signature · 1 line
1.5.6.3
#1 lore raw

Hi Alok,

Quoted 9 lines · On Tue, Jul 07, 2009, [email protected] wrote:

From: Alok Barsode <[email protected]>

---
 plugins/hal.c  |    4 +-
 src/adapter.c  |  131 ++++++++++++++++++++++++++++++++++++++++++--------------
 src/adapter.h  |    5 ++-
 src/dbus-hci.c |   45 +------------------
 src/dbus-hci.h |    4 --
 5 files changed, 107 insertions(+), 82 deletions(-)

The patch has been pushed upstream. Thanks!

Johan