summaryrefslogtreecommitdiff
path: root/src/xmpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-02-26 02:56:46 +0100
committerFlorent Le Coz <louiz@louiz.org>2015-02-26 02:56:46 +0100
commit53e6b1da69199f54303e4cb2b00db3205f62ce6e (patch)
tree9b6776340beb922e65980aa2a027284d25a64902 /src/xmpp
parent5db063781032fb4ae9c823737636c1240b67d111 (diff)
downloadbiboumi-53e6b1da69199f54303e4cb2b00db3205f62ce6e.tar.gz
biboumi-53e6b1da69199f54303e4cb2b00db3205f62ce6e.tar.bz2
biboumi-53e6b1da69199f54303e4cb2b00db3205f62ce6e.tar.xz
biboumi-53e6b1da69199f54303e4cb2b00db3205f62ce6e.zip
Fix the systemd-conditional code
By using SYSTEMD_FOUND instead of SYSTEMDDAEMON_FOUND, where I forgot to rename it…
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/xmpp_component.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp
index 1df1e5d..d1f250a 100644
--- a/src/xmpp/xmpp_component.cpp
+++ b/src/xmpp/xmpp_component.cpp
@@ -17,7 +17,7 @@
#include <uuid.h>
-#ifdef SYSTEMDDAEMON_FOUND
+#ifdef SYSTEMD_FOUND
# include <systemd/sd-daemon.h>
#endif
@@ -89,7 +89,7 @@ void XmppComponent::on_connection_failed(const std::string& reason)
{
this->first_connection_try = false;
log_error("Failed to connect to the XMPP server: " << reason);
-#ifdef SYSTEMDDAEMON_FOUND
+#ifdef SYSTEMD_FOUND
sd_notifyf(0, "STATUS=Failed to connect to the XMPP server: %s", reason.data());
#endif
}
@@ -279,7 +279,7 @@ void XmppComponent::handle_handshake(const Stanza& stanza)
this->authenticated = true;
this->ever_auth = true;
log_info("Authenticated with the XMPP server");
-#ifdef SYSTEMDDAEMON_FOUND
+#ifdef SYSTEMD_FOUND
sd_notify(0, "READY=1");
// Install an event that sends a keepalive to systemd. If biboumi crashes
// or hangs for too long, systemd will restart it.
@@ -626,7 +626,7 @@ void XmppComponent::handle_error(const Stanza& stanza)
if (text)
error_message = text->get_inner();
log_error("Stream error received from the XMPP server: " << error_message);
-#ifdef SYSTEMDDAEMON_FOUND
+#ifdef SYSTEMD_FOUND
if (!this->ever_auth)
sd_notifyf(0, "STATUS=Failed to authenticate to the XMPP server: %s", error_message.data());
#endif