From c0e0a7086902a9d5cfbe88c4aa220abdf2ee3dde Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 11 Apr 2014 21:13:09 +0200 Subject: socks5 initialisation works. doesn't get activate though --- .../xmpp/jingle/JingleConnectionManager.java | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java') diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java b/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java index b28f692a..7105774d 100644 --- a/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java +++ b/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java @@ -23,7 +23,7 @@ public class JingleConnectionManager { private List connections = new ArrayList(); // make // concurrent - private ConcurrentHashMap primaryCanditates = new ConcurrentHashMap(); + private ConcurrentHashMap primaryCandidates = new ConcurrentHashMap(); private SecureRandom random = new SecureRandom(); @@ -67,9 +67,9 @@ public class JingleConnectionManager { return this.xmppConnectionService; } - public void getPrimaryCanditate(Account account, - final OnPrimaryCanditateFound listener) { - if (!this.primaryCanditates.containsKey(account.getJid())) { + public void getPrimaryCandidate(Account account, + final OnPrimaryCandidateFound listener) { + if (!this.primaryCandidates.containsKey(account.getJid())) { String xmlns = "http://jabber.org/protocol/bytestreams"; final String proxy = account.getXmppConnection() .findDiscoItemByFeature(xmlns); @@ -90,34 +90,34 @@ public class JingleConnectionManager { if (streamhost != null) { Log.d("xmppService", "streamhost found " + streamhost.toString()); - Element canditate = new Element("canditate"); - canditate.setAttribute("cid", + Element candidate = new Element("candidate"); + candidate.setAttribute("cid", nextRandomId()); - canditate.setAttribute("host", + candidate.setAttribute("host", streamhost.getAttribute("host")); - canditate.setAttribute("port", + candidate.setAttribute("port", streamhost.getAttribute("port")); - canditate.setAttribute("type", "proxy"); - canditate.setAttribute("jid", proxy); - canditate + candidate.setAttribute("type", "proxy"); + candidate.setAttribute("jid", proxy); + candidate .setAttribute("priority", "655360"); - primaryCanditates.put(account.getJid(), - canditate); - listener.onPrimaryCanditateFound(true, - canditate); + primaryCandidates.put(account.getJid(), + candidate); + listener.onPrimaryCandidateFound(true, + candidate); } else { - listener.onPrimaryCanditateFound(false, + listener.onPrimaryCandidateFound(false, null); } } }); } else { - listener.onPrimaryCanditateFound(false, null); + listener.onPrimaryCandidateFound(false, null); } } else { - listener.onPrimaryCanditateFound(true, - this.primaryCanditates.get(account.getJid())); + listener.onPrimaryCandidateFound(true, + this.primaryCandidates.get(account.getJid())); } } -- cgit v1.2.3