summaryrefslogtreecommitdiffstats
path: root/database
diff options
context:
space:
mode:
authorEmmanuel Vasilakis <mrzammler@mm.st>2021-10-14 15:22:19 +0300
committerGitHub <noreply@github.com>2021-10-14 15:22:19 +0300
commit882bc018f3f128a3f825ce537e00952f84e013e6 (patch)
tree6bfb13926d5601e79d39dbed806f08959145d713 /database
parent2f620750163d07830b233ea4972ac6c8f41a4e7f (diff)
Fix build issue related to legacy aclk and new arch code (#11655)
* add idefs to protect regions of alerts code * remove check
Diffstat (limited to 'database')
-rw-r--r--database/sqlite/sqlite_aclk_alert.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/database/sqlite/sqlite_aclk_alert.c b/database/sqlite/sqlite_aclk_alert.c
index 846d9bdf2d..dfc948b529 100644
--- a/database/sqlite/sqlite_aclk_alert.c
+++ b/database/sqlite/sqlite_aclk_alert.c
@@ -3,7 +3,7 @@
#include "sqlite_functions.h"
#include "sqlite_aclk_alert.h"
-#ifdef ENABLE_ACLK
+#ifdef ENABLE_NEW_CLOUD_PROTOCOL
#include "../../aclk/aclk_alarm_api.h"
#include "../../aclk/aclk.h"
#endif
@@ -15,12 +15,17 @@ void sql_queue_alarm_to_aclk(RRDHOST *host, ALARM_ENTRY *ae)
//check aclk architecture and handle old json alarm update to cloud
//include also the valid statuses for this case
#ifdef ENABLE_ACLK
+#ifdef ENABLE_NEW_CLOUD_PROTOCOL
if (!aclk_use_new_cloud_arch) {
+#endif
+
if ((ae->new_status == RRDCALC_STATUS_WARNING || ae->new_status == RRDCALC_STATUS_CRITICAL) ||
((ae->old_status == RRDCALC_STATUS_WARNING || ae->old_status == RRDCALC_STATUS_CRITICAL))) {
aclk_update_alarm(host, ae);
}
return;
+#endif
+#ifdef ENABLE_NEW_CLOUD_PROTOCOL
}
if (ae->flags & HEALTH_ENTRY_FLAG_ACLK_QUEUED)
@@ -92,7 +97,7 @@ bind_fail:
int rrdcalc_status_to_proto_enum(RRDCALC_STATUS status)
{
-#ifdef ENABLE_ACLK
+#ifdef ENABLE_NEW_CLOUD_PROTOCOL
switch(status) {
case RRDCALC_STATUS_REMOVED:
return ALARM_STATUS_REMOVED;