mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-10 14:16:00 +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:
parent
b2a7d0d9a6
commit
5393774a1c
1 changed files with 15 additions and 13 deletions
|
@ -267,21 +267,23 @@ public class JingleManager implements JingleSessionListener {
|
|||
}
|
||||
|
||||
public void presenceChanged(Presence presence) {
|
||||
String xmppAddress = presence.getFrom();
|
||||
JingleSession aux = null;
|
||||
for (JingleSession jingleSession : jingleSessions) {
|
||||
if (jingleSession.getInitiator().equals(xmppAddress) ||
|
||||
jingleSession.getResponder().equals(xmppAddress)) {
|
||||
aux = jingleSession;
|
||||
if (!presence.isAvailable()) {
|
||||
String xmppAddress = presence.getFrom();
|
||||
JingleSession aux = null;
|
||||
for (JingleSession jingleSession : jingleSessions) {
|
||||
if (jingleSession.getInitiator().equals(xmppAddress) ||
|
||||
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();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue