Commit 3dece724 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

1. Fixed incorrect namespace returned for disco#get.

2. Fixed disco#items.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3468 b35dd754-fafc-0310-a699-88a17e54d16e
parent efaa0b1b
......@@ -12,7 +12,6 @@ package org.jivesoftware.wildfire.filetransfer;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.QName;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.Log;
import org.jivesoftware.wildfire.*;
......@@ -99,12 +98,11 @@ public class FileTransferProxy extends BasicModule
else if (NAMESPACE.equals(namespace)) {
if (packet.getType() == IQ.Type.get) {
IQ reply = IQ.createResultIQ(packet);
reply.setChildElement("query", NAMESPACE);
Element response = DocumentHelper.createElement(QName.get("streamhost"));
Element newChild = reply.setChildElement("query", NAMESPACE);
Element response = newChild.addElement("streamhost");
response.addAttribute("jid", getServiceDomain());
response.addAttribute("host", proxyIP);
response.addAttribute("port", String.valueOf(connectionManager.getProxyPort()));
reply.getChildElement().add(response);
router.route(reply);
return true;
}
......@@ -273,7 +271,7 @@ public class FileTransferProxy extends BasicModule
public Iterator<Element> getItems(String name, String node, JID senderJID) {
// A proxy server has no items
return null;
return new ArrayList<Element>().iterator();
}
public void process(Packet packet) throws UnauthorizedException, PacketException {
......
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