Connect to localhost instead of the served hostname

Because the XMPP component connection is only available locally, the XMPP
servers proably only listen on 127.0.0.1 instead of 0.0.0.0.
This commit is contained in:
Florent Le Coz
2013-11-10 05:10:54 +01:00
parent 0bb7ee0127
commit a992e281c4
+2 -2
View File
@@ -44,7 +44,7 @@ XmppComponent::~XmppComponent()
void XmppComponent::start() void XmppComponent::start()
{ {
this->connect(this->served_hostname, "5347"); this->connect("127.0.0.1", "5347");
} }
void XmppComponent::send_stanza(const Stanza& stanza) void XmppComponent::send_stanza(const Stanza& stanza)
@@ -60,7 +60,7 @@ void XmppComponent::on_connected()
XmlNode node("stream:stream", nullptr); XmlNode node("stream:stream", nullptr);
node["xmlns"] = COMPONENT_NS; node["xmlns"] = COMPONENT_NS;
node["xmlns:stream"] = STREAM_NS; node["xmlns:stream"] = STREAM_NS;
node["to"] = "irc.abricot"; node["to"] = this->served_hostname;
this->send_stanza(node); this->send_stanza(node);
} }