diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-02-24 02:16:28 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-02-24 02:16:28 +0000 |
commit | cbedcb58d895cc15f6b697926834eb9f421956bb (patch) | |
tree | e2ccdeca44db9a0976447c24434f2dcc63801352 /hcid/dbus-device.c | |
parent | b25e1fb7e929d1642dad88a21733cde53ec89f10 (diff) |
Add support for the minor class changed signal
Diffstat (limited to 'hcid/dbus-device.c')
-rw-r--r-- | hcid/dbus-device.c | 12 |
1 files changed, 11 insertions, 1 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: |