aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-04-13 11:32:45 +0200
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-04-13 11:32:45 +0200
commit27d5966ac356fd10365d848332b127b0b8f417da (patch)
treeeb98cb6d7fdcc79b5e405acadcef9d8bbcc1e2c8 /src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
parent7b554f20013441e7c2a4f803870edfc9ca5d2cca (diff)
more efficant way of calculating the sha1 sum. closing connections
Diffstat (limited to 'src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java')
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java b/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
index 89ff717d..45323e44 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
@@ -32,15 +32,20 @@ public class JingleConnectionManager {
}
public void deliverPacket(Account account, JinglePacket packet) {
- for (JingleConnection connection : connections) {
- if (connection.getAccountJid().equals(account.getJid()) && connection
- .getSessionId().equals(packet.getSessionId()) && connection
- .getCounterPart().equals(packet.getFrom())) {
- connection.deliverPacket(packet);
- return;
+ if (packet.isAction("session-initiate")) {
+ JingleConnection connection = new JingleConnection(this);
+ connection.init(account,packet);
+ } else {
+ for (JingleConnection connection : connections) {
+ if (connection.getAccountJid().equals(account.getJid()) && connection
+ .getSessionId().equals(packet.getSessionId()) && connection
+ .getCounterPart().equals(packet.getFrom())) {
+ connection.deliverPacket(packet);
+ return;
+ }
}
+ Log.d("xmppService","delivering packet failed "+packet.toString());
}
- Log.d("xmppService","delivering packet failed "+packet.toString());
}
public JingleConnection createNewConnection(Message message) {