Commit 1604320a authored by louiz’'s avatar louiz’

Make the XMPP component port configurable

fix #2541
parent 8b30e312
...@@ -46,6 +46,11 @@ The configuration file uses a simple format of the form ...@@ -46,6 +46,11 @@ The configuration file uses a simple format of the form
This password must be configured in the XMPP server, associated with the This password must be configured in the XMPP server, associated with the
external component on *hostname*. external component on *hostname*.
`port`
The TCP port to use to connect to the local XMPP component. The default
value is 5347.
`admin` `admin`
The bare JID of the gateway administrator. This JID will have more The bare JID of the gateway administrator. This JID will have more
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
#include <logger/logger.hpp> #include <logger/logger.hpp>
#include <xmpp/xmpp_component.hpp> #include <xmpp/xmpp_component.hpp>
#include <config/config.hpp>
#include <xmpp/jid.hpp> #include <xmpp/jid.hpp>
#include <utils/sha1.hpp> #include <utils/sha1.hpp>
#include <stdexcept> #include <stdexcept>
...@@ -68,7 +68,7 @@ XmppComponent::~XmppComponent() ...@@ -68,7 +68,7 @@ XmppComponent::~XmppComponent()
void XmppComponent::start() void XmppComponent::start()
{ {
this->connect("127.0.0.1", "5347", false); this->connect("127.0.0.1", Config::get("port", "5347"), false);
} }
bool XmppComponent::is_document_open() const bool XmppComponent::is_document_open() const
......
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