From 8c596682730de422fae9489287fee27b36137c1a Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 19 Apr 2014 02:19:26 +0200 Subject: [PATCH] made debugging verbose again on specific parts --- .../siacs/conversations/xmpp/jingle/JingleConnection.java | 6 ++++++ .../xmpp/jingle/JingleConnectionManager.java | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java index 7c5a0f63..1f6b629c 100644 --- a/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java +++ b/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java @@ -119,17 +119,20 @@ public class JingleConnection { @Override public void failed() { + Log.d("xmppService","connection to our own primary candidete failed"); sendInitRequest(); } @Override public void established() { + Log.d("xmppService","succesfully connected to our own primary candidate"); mergeCandidate(candidate); sendInitRequest(); } }); mergeCandidate(candidate); } else { + Log.d("xmppService","no primary candidate of our own was found"); sendInitRequest(); } } @@ -216,6 +219,7 @@ public class JingleConnection { @Override public void failed() { + Log.d("xmppService","connection to our own primary candidate failed"); content.setCandidates(transportId, getCandidatesAsElements()); packet.setContent(content); sendJinglePacket(packet); @@ -223,6 +227,7 @@ public class JingleConnection { @Override public void established() { + Log.d("xmppService","connected to primary candidate"); mergeCandidate(candidate); content.setCandidates(transportId, getCandidatesAsElements()); packet.setContent(content); @@ -230,6 +235,7 @@ public class JingleConnection { } }); } else { + Log.d("xmppService","did not find a primary candidate for ourself"); content.setCandidates(transportId, getCandidatesAsElements()); packet.setContent(content); sendJinglePacket(packet); diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java b/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java index a45ebb76..4618a1be 100644 --- a/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java +++ b/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java @@ -3,8 +3,8 @@ package eu.siacs.conversations.xmpp.jingle; import java.math.BigInteger; import java.security.SecureRandom; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; -import java.util.concurrent.ConcurrentHashMap; import android.util.Log; @@ -20,10 +20,9 @@ public class JingleConnectionManager { private XmppConnectionService xmppConnectionService; - private List connections = new ArrayList(); // make - // concurrent + private List connections = new ArrayList(); - private ConcurrentHashMap primaryCandidates = new ConcurrentHashMap(); + private HashMap primaryCandidates = new HashMap(); private SecureRandom random = new SecureRandom(); @@ -110,6 +109,7 @@ public class JingleConnectionManager { } } else { + Log.d("xmppService","found primary candidate in archive"); listener.onPrimaryCandidateFound(true, this.primaryCandidates.get(account.getJid())); }