Commit 1665cb63 authored by aninhacostaribeiro's avatar aninhacostaribeiro
Browse files

modified the handler

parent 3054add1
......@@ -19,7 +19,7 @@ public class IAmAliveHandler extends AbstractQueryHandler {
//expected content format: IP plus MAC Address plus host name (eg. "123.456.789 a1:2b:3c:d4:45:67 bobo")
String ip = query.getElement().element("query").elementText("ip");
String hostName = query.getElement().element("query").elementText("hostName");
String jid = query.getFrom().toFullJID();
String jid = query.getFrom().toString();
String macAddress = query.getElement().element("query").elementText("macAddress");
gs.setAgentAddress(hostName, jid, ip, macAddress);
......
......@@ -36,7 +36,7 @@ public class TestIamAliverHandler {
IAmAliveHandler iah = new IAmAliveHandler(gs);
IQ result = iah.handle(iq);
Assert.assertEquals("result", result.getType().name());
}
}
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