aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java')
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java b/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
index 7df27d4d..972489d0 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
@@ -35,13 +35,16 @@ public class JingleConnectionManager {
if (packet.isAction("session-initiate")) {
JingleConnection connection = new JingleConnection(this);
connection.init(account,packet);
+ connections.add(connection);
} else {
for (JingleConnection connection : connections) {
- if (connection.getAccountJid().equals(account.getJid()) && connection
+ if (connection.getAccountJid().equals(account.getFullJid()) && connection
.getSessionId().equals(packet.getSessionId()) && connection
.getCounterPart().equals(packet.getFrom())) {
connection.deliverPacket(packet);
return;
+ } else {
+ Log.d("xmppService","no match sid:"+connection.getSessionId()+"="+packet.getSessionId()+" counterpart:"+connection.getCounterPart()+"="+packet.getFrom()+" account:"+connection.getAccountJid()+"="+packet.getTo());
}
}
Log.d("xmppService","delivering packet failed "+packet.toString());
@@ -118,6 +121,14 @@ public class JingleConnectionManager {
this.primaryCandidates.get(account.getJid()));
}
}
+
+ public String getPrimaryCandidateId(Account account) {
+ if (this.primaryCandidates.containsKey(account.getJid())) {
+ return this.primaryCandidates.get(account.getJid()).getAttribute("cid");
+ } else {
+ return null;
+ }
+ }
public String nextRandomId() {
return new BigInteger(50, random).toString(32);