From 146bf24eda9f3ca73a91634565ea85f23ab5f0ce Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Sun, 18 Jan 2015 18:27:01 +0100 Subject: [PATCH] device: use local host and user names in identity --- src/device.vala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/device.vala b/src/device.vala index 84c4e47..b2aff34 100644 --- a/src/device.vala +++ b/src/device.vala @@ -84,8 +84,10 @@ class Device : Object { private async void greet() { var core = Core.instance(); - yield _channel.send(Packet.new_identity("test-laptop", - "dadada", + string host_name = Environment.get_host_name(); + string user = Environment.get_user_name(); + yield _channel.send(Packet.new_identity(@"$user@$host_name", + Environment.get_host_name(), core.handlers.interfaces, core.handlers.interfaces)); this.pair_if_needed();