summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-device.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-02-24 18:12:08 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-02-24 18:12:08 +0000
commitd2bc437c04a2048856ba3edc54b9553bfdbd6e55 (patch)
tree1a36ade3bf7263246f7a43478c7056e8266f0a07 /hcid/dbus-device.c
parentb0fc2dd356f7f5e1bceb3d901058bcd9e2bc5535 (diff)
Store the changed name of a local device
Diffstat (limited to 'hcid/dbus-device.c')
-rw-r--r--hcid/dbus-device.c5
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);