aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu')
-rw-r--r--src/eu/siacs/conversations/services/XmppConnectionService.java17
-rw-r--r--src/eu/siacs/conversations/xmpp/stanzas/IqPacket.java3
2 files changed, 19 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java
index d554c504..15c828a7 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -392,8 +392,23 @@ public class XmppConnectionService extends Service {
.hasChild("data", "http://jabber.org/protocol/ibb")) {
XmppConnectionService.this.mJingleConnectionManager
.deliverIbbPacket(account, packet);
+ } else if (packet.hasChild("query","http://jabber.org/protocol/disco#info")) {
+ IqPacket iqResponse = packet.generateRespone(IqPacket.TYPE_RESULT);
+ Element query = iqResponse.addChild("query", "http://jabber.org/protocol/disco#info");
+ query.addChild("feature").setAttribute("var", "urn:xmpp:jingle:1");
+ query.addChild("feature").setAttribute("var", "urn:xmpp:jingle:apps:file-transfer:3");
+ query.addChild("feature").setAttribute("var", "urn:xmpp:jingle:transports:s5b:1");
+ query.addChild("feature").setAttribute("var", "urn:xmpp:jingle:transports:ibb:1");
+ Log.d(LOGTAG,"replying to disco from "+packet.getFrom()+"with: "+iqResponse);
+ account.getXmppConnection().sendIqPacket(iqResponse, null);
} else {
- Log.d(LOGTAG, "iq packet arrived " + packet.toString());
+ if ((packet.getType() == IqPacket.TYPE_GET)||(packet.getType() == IqPacket.TYPE_SET)) {
+ IqPacket response = packet.generateRespone(IqPacket.TYPE_ERROR);
+ Element error = response.addChild("error");
+ error.setAttribute("type","cancel");
+ error.addChild("feature-not-implemented","urn:ietf:params:xml:ns:xmpp-stanzas");
+ account.getXmppConnection().sendIqPacket(response, null);
+ }
}
}
};
diff --git a/src/eu/siacs/conversations/xmpp/stanzas/IqPacket.java b/src/eu/siacs/conversations/xmpp/stanzas/IqPacket.java
index 9e288454..48e5c0ec 100644
--- a/src/eu/siacs/conversations/xmpp/stanzas/IqPacket.java
+++ b/src/eu/siacs/conversations/xmpp/stanzas/IqPacket.java
@@ -26,6 +26,9 @@ public class IqPacket extends AbstractStanza {
case TYPE_RESULT:
this.setAttribute("type", "result");
break;
+ case TYPE_ERROR:
+ this.setAttribute("type", "error");
+ break;
default:
break;
}