Commit c13b4a1e authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Couple of stability tweaks.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5100 b35dd754-fafc-0310-a699-88a17e54d16e
parent 16b567fd
...@@ -199,7 +199,10 @@ public class MSNSession extends TransportSession { ...@@ -199,7 +199,10 @@ public class MSNSession extends TransportSession {
* @see org.jivesoftware.wildfire.gateway.TransportSession#updateStatus(org.jivesoftware.wildfire.gateway.PresenceType, String) * @see org.jivesoftware.wildfire.gateway.TransportSession#updateStatus(org.jivesoftware.wildfire.gateway.PresenceType, String)
*/ */
public void updateStatus(PresenceType presenceType, String verboseStatus) { public void updateStatus(PresenceType presenceType, String verboseStatus) {
msnMessenger.getOwner().setStatus(((MSNTransport)getTransport()).convertJabStatusToMSN(presenceType)); if (isLoggedIn()) {
msnMessenger.getOwner().setStatus(((MSNTransport)getTransport()).convertJabStatusToMSN(presenceType));
}
// TODO: Should I consider logging them in?
} }
/** /**
......
...@@ -98,12 +98,16 @@ public class OSCARSession extends TransportSession { ...@@ -98,12 +98,16 @@ public class OSCARSession extends TransportSession {
} }
public synchronized void logOut() { public synchronized void logOut() {
bosConn.disconnect(); if (isLoggedIn()) {
loggedIn = false; if (bosConn != null) {
Presence p = new Presence(Presence.Type.unavailable); bosConn.disconnect();
p.setTo(getJID()); }
p.setFrom(getTransport().getJID()); loggedIn = false;
getTransport().sendPacket(p); Presence p = new Presence(Presence.Type.unavailable);
p.setTo(getJID());
p.setFrom(getTransport().getJID());
getTransport().sendPacket(p);
}
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment