diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-02-24 18:12:08 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-02-24 18:12:08 +0000 |
commit | d2bc437c04a2048856ba3edc54b9553bfdbd6e55 (patch) | |
tree | 1a36ade3bf7263246f7a43478c7056e8266f0a07 /hcid/dbus-device.c | |
parent | b0fc2dd356f7f5e1bceb3d901058bcd9e2bc5535 (diff) |
Store the changed name of a local device
Diffstat (limited to 'hcid/dbus-device.c')
-rw-r--r-- | hcid/dbus-device.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hcid/dbus-device.c b/hcid/dbus-device.c index ac592686..a9313505 100644 --- a/hcid/dbus-device.c +++ b/hcid/dbus-device.c @@ -296,6 +296,7 @@ static DBusMessage *handle_dev_set_name_req(DBusMessage *msg, void *data) struct hci_dbus_data *dbus_data = data; DBusMessageIter iter; DBusMessage *reply; + bdaddr_t bdaddr; char *str_ptr; dbus_message_iter_init(msg, &iter); @@ -306,6 +307,10 @@ static DBusMessage *handle_dev_set_name_req(DBusMessage *msg, void *data) return bluez_new_failure_msg(msg, BLUEZ_EDBUS_WRONG_PARAM); } + hci_devba(dbus_data->dev_id, &bdaddr); + + write_local_name(&bdaddr, str_ptr); + set_device_name(dbus_data->dev_id, str_ptr); reply = dbus_message_new_method_return(msg); |