Fix the systemd-conditional code
By using SYSTEMD_FOUND instead of SYSTEMDDAEMON_FOUND, where I forgot to rename it…
This commit is contained in:
+4
-4
@@ -82,8 +82,8 @@ if(LIBIDN_FOUND)
|
|||||||
include_directories(${LIBIDN_INCLUDE_DIRS})
|
include_directories(${LIBIDN_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SYSTEMDDAEMON_FOUND)
|
if(SYSTEMD_FOUND)
|
||||||
include_directories(${SYSTEMDDAEMON_INCLUDE_DIRS})
|
include_directories(${SYSTEMD_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BOTAN_FOUND)
|
if(BOTAN_FOUND)
|
||||||
@@ -198,8 +198,8 @@ target_link_libraries(${PROJECT_NAME}
|
|||||||
bridge
|
bridge
|
||||||
utils
|
utils
|
||||||
config)
|
config)
|
||||||
if(SYSTEMDDAEMON_FOUND)
|
if(SYSTEMD_FOUND)
|
||||||
target_link_libraries(xmpp ${SYSTEMDDAEMON_LIBRARIES})
|
target_link_libraries(xmpp ${SYSTEMD_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifdef SYSTEMDDAEMON_FOUND
|
#ifdef SYSTEMD_FOUND
|
||||||
# include <systemd/sd-daemon.h>
|
# include <systemd/sd-daemon.h>
|
||||||
#else
|
#else
|
||||||
# define SD_DEBUG "[DEBUG]: "
|
# define SD_DEBUG "[DEBUG]: "
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include <uuid.h>
|
#include <uuid.h>
|
||||||
|
|
||||||
#ifdef SYSTEMDDAEMON_FOUND
|
#ifdef SYSTEMD_FOUND
|
||||||
# include <systemd/sd-daemon.h>
|
# include <systemd/sd-daemon.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ void XmppComponent::on_connection_failed(const std::string& reason)
|
|||||||
{
|
{
|
||||||
this->first_connection_try = false;
|
this->first_connection_try = false;
|
||||||
log_error("Failed to connect to the XMPP server: " << reason);
|
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());
|
sd_notifyf(0, "STATUS=Failed to connect to the XMPP server: %s", reason.data());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -279,7 +279,7 @@ void XmppComponent::handle_handshake(const Stanza& stanza)
|
|||||||
this->authenticated = true;
|
this->authenticated = true;
|
||||||
this->ever_auth = true;
|
this->ever_auth = true;
|
||||||
log_info("Authenticated with the XMPP server");
|
log_info("Authenticated with the XMPP server");
|
||||||
#ifdef SYSTEMDDAEMON_FOUND
|
#ifdef SYSTEMD_FOUND
|
||||||
sd_notify(0, "READY=1");
|
sd_notify(0, "READY=1");
|
||||||
// Install an event that sends a keepalive to systemd. If biboumi crashes
|
// Install an event that sends a keepalive to systemd. If biboumi crashes
|
||||||
// or hangs for too long, systemd will restart it.
|
// or hangs for too long, systemd will restart it.
|
||||||
@@ -626,7 +626,7 @@ void XmppComponent::handle_error(const Stanza& stanza)
|
|||||||
if (text)
|
if (text)
|
||||||
error_message = text->get_inner();
|
error_message = text->get_inner();
|
||||||
log_error("Stream error received from the XMPP server: " << error_message);
|
log_error("Stream error received from the XMPP server: " << error_message);
|
||||||
#ifdef SYSTEMDDAEMON_FOUND
|
#ifdef SYSTEMD_FOUND
|
||||||
if (!this->ever_auth)
|
if (!this->ever_auth)
|
||||||
sd_notifyf(0, "STATUS=Failed to authenticate to the XMPP server: %s", error_message.data());
|
sd_notifyf(0, "STATUS=Failed to authenticate to the XMPP server: %s", error_message.data());
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user