1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-23 04:22:05 +01:00

Fix Presence Bug

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7430 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Thiago Camargo 2007-03-09 18:30:48 +00:00 committed by thiago
parent b2a7d0d9a6
commit 5393774a1c

View file

@ -267,21 +267,23 @@ public class JingleManager implements JingleSessionListener {
} }
public void presenceChanged(Presence presence) { public void presenceChanged(Presence presence) {
String xmppAddress = presence.getFrom(); if (!presence.isAvailable()) {
JingleSession aux = null; String xmppAddress = presence.getFrom();
for (JingleSession jingleSession : jingleSessions) { JingleSession aux = null;
if (jingleSession.getInitiator().equals(xmppAddress) || for (JingleSession jingleSession : jingleSessions) {
jingleSession.getResponder().equals(xmppAddress)) { if (jingleSession.getInitiator().equals(xmppAddress) ||
aux = jingleSession; jingleSession.getResponder().equals(xmppAddress)) {
aux = jingleSession;
}
} }
if (aux != null)
try {
aux.terminate();
}
catch (XMPPException e) {
e.printStackTrace();
}
} }
if (aux != null)
try {
aux.terminate();
}
catch (XMPPException e) {
e.printStackTrace();
}
} }
}); });