summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
Diffstat (limited to 'hcid')
-rw-r--r--hcid/dbus-device.c12
-rw-r--r--hcid/dbus.h3
2 files changed, 13 insertions, 2 deletions
diff --git a/hcid/dbus-device.c b/hcid/dbus-device.c
index 97bb590f..8f7d6bfe 100644
--- a/hcid/dbus-device.c
+++ b/hcid/dbus-device.c
@@ -471,8 +471,9 @@ static DBusMessage *handle_dev_set_discoverable_to_req(DBusMessage *msg, void *d
static DBusMessage *handle_dev_set_minor_class_req(DBusMessage *msg, void *data)
{
struct hci_dbus_data *dbus_data = data;
- DBusMessage *reply;
+ DBusConnection *connection = get_dbus_connection();
DBusMessageIter iter;
+ DBusMessage *reply, *signal;
const char *minor;
uint8_t cls[3];
uint32_t dev_class = 0xFFFFFFFF;
@@ -518,6 +519,15 @@ static DBusMessage *handle_dev_set_minor_class_req(DBusMessage *msg, void *data)
goto failed;
}
+ signal = dev_signal_factory(dbus_data->dev_id, DEV_SIG_MINOR_CLASS_CHANGED,
+ DBUS_TYPE_STRING, &minor,
+ DBUS_TYPE_INVALID);
+ if (signal) {
+ dbus_connection_send(connection, signal, NULL);
+ dbus_connection_flush(connection);
+ dbus_message_unref(signal);
+ }
+
reply = dbus_message_new_method_return(msg);
failed:
diff --git a/hcid/dbus.h b/hcid/dbus.h
index 2ddbeb8b..86303ef1 100644
--- a/hcid/dbus.h
+++ b/hcid/dbus.h
@@ -203,8 +203,9 @@ int get_default_dev_id(void);
/* Signals sent in the Manager path */
-#define DEV_SIG_MODE_CHANGED "ModeChanged"
+#define DEV_SIG_MODE_CHANGED "ModeChanged"
#define DEV_SIG_NAME_CHANGED "NameChanged"
+#define DEV_SIG_MINOR_CLASS_CHANGED "MinorClassChanged"
#define DEV_SIG_REMOTE_NAME_CHANGED "RemoteNameChange"
#define DEV_SIG_REMOTE_ALIAS_CHANGED "RemoteAliasChanged"
#define DEV_SIG_BONDING_CREATED "BondingCreated"