diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-04-13 21:10:36 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-04-13 21:10:36 +0200 |
commit | 084ab51b1d7625cdf1cca4cc6a31715acffe5ce7 (patch) | |
tree | bd1ab4b6d48aaafd4e410b50d7f5f3d7fd8e5f14 /src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java | |
parent | 7dfe4ae0823238da216088f80de40b9ff6b1446d (diff) |
transmitting files between two conversations works. no error handling and no ui on the receiving end
Diffstat (limited to 'src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java')
-rw-r--r-- | src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java | 13 |
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); |