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.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 89ff717d1..45323e44c 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) {