From d2e1500ac1ceb57a0ec9ae9a04f5e4ecab15855e Mon Sep 17 00:00:00 2001 From: akwizgran <akwizgran@users.sourceforge.net> Date: Fri, 28 Oct 2011 13:17:17 +0100 Subject: [PATCH] Store the UUID in the local properties so it gets sent to contacts. --- .../net/sf/briar/plugins/bluetooth/BluetoothPlugin.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/components/net/sf/briar/plugins/bluetooth/BluetoothPlugin.java b/components/net/sf/briar/plugins/bluetooth/BluetoothPlugin.java index 978f536da3..78b9c648a8 100644 --- a/components/net/sf/briar/plugins/bluetooth/BluetoothPlugin.java +++ b/components/net/sf/briar/plugins/bluetooth/BluetoothPlugin.java @@ -18,7 +18,6 @@ import javax.microedition.io.StreamConnection; import javax.microedition.io.StreamConnectionNotifier; import net.sf.briar.api.ContactId; -import net.sf.briar.api.TransportConfig; import net.sf.briar.api.TransportId; import net.sf.briar.api.TransportProperties; import net.sf.briar.api.plugins.StreamPlugin; @@ -126,15 +125,15 @@ class BluetoothPlugin extends AbstractPlugin implements StreamPlugin { private synchronized String getUuid() { assert started; - TransportConfig c = callback.getConfig(); - String uuid = c.get("uuid"); + TransportProperties p = callback.getLocalProperties(); + String uuid = p.get("uuid"); if(uuid == null) { // Generate a (weakly) random UUID and store it byte[] b = new byte[16]; new Random().nextBytes(b); uuid = StringUtils.toHexString(b); - c.put("uuid", uuid); - callback.setConfig(c); + p.put("uuid", uuid); + callback.setLocalProperties(p); } return uuid; } -- GitLab