aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp/XmppConnection.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-14 20:43:54 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-14 20:43:54 +0100
commitbae741875690400efac68ed49f2ead405ec2ed53 (patch)
treefcff87d7f105744d5f9f096dfc4160d1573db7ea /src/eu/siacs/conversations/xmpp/XmppConnection.java
parent29e128513d3abdaae829e99ec9dfab1b0a0d84cd (diff)
fixed logic bug with cleaning of presences
Diffstat (limited to 'src/eu/siacs/conversations/xmpp/XmppConnection.java')
-rw-r--r--src/eu/siacs/conversations/xmpp/XmppConnection.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java
index 4d5d0ec25..1f0f23a23 100644
--- a/src/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -86,7 +86,8 @@ public class XmppConnection implements Runnable {
private OnIqPacketReceived unregisteredIqListener = null;
private OnMessagePacketReceived messageListener = null;
private OnStatusChanged statusListener = null;
- private OnTLSExceptionReceived tlsListener;
+ private OnTLSExceptionReceived tlsListener = null;
+ private OnBindListener bindListener = null;
public XmppConnection(Account account, PowerManager pm) {
this.account = account;
@@ -540,6 +541,9 @@ public class XmppConnection implements Runnable {
String resource = packet.findChild("bind").findChild("jid")
.getContent().split("/")[1];
account.setResource(resource);
+ if (bindListener !=null) {
+ bindListener.onBind(account);
+ }
account.setStatus(Account.STATUS_ONLINE);
if (streamFeatures.hasChild("sm")) {
EnablePacket enable = new EnablePacket();
@@ -693,6 +697,10 @@ public class XmppConnection implements Runnable {
public void setOnTLSExceptionReceivedListener(OnTLSExceptionReceived listener) {
this.tlsListener = listener;
}
+
+ public void setOnBindListener(OnBindListener listener) {
+ this.bindListener = listener;
+ }
public void disconnect(boolean force) {
changeStatus(Account.STATUS_OFFLINE);