summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2022-03-09 17:22:30 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2022-03-09 17:22:30 +0100
commit318037cd0a754f8270f413183ed3b1a245d6a2e3 (patch)
tree14e37c3532c68e3d8a9ca5d63cb30d6529160172 /net-analyzer
parentdev-lang/python: stable 3.8.12_p2 for sparc, bug #834645 (diff)
downloadgentoo-318037cd0a754f8270f413183ed3b1a245d6a2e3.tar.gz
gentoo-318037cd0a754f8270f413183ed3b1a245d6a2e3.tar.bz2
gentoo-318037cd0a754f8270f413183ed3b1a245d6a2e3.zip
net-analyzer/zabbix: fixed server crash in 6.0.1
Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/zabbix/files/zabbix-6.0.1-fix-server-crash.patch40
-rw-r--r--net-analyzer/zabbix/zabbix-6.0.1-r1.ebuild (renamed from net-analyzer/zabbix/zabbix-6.0.1.ebuild)1
2 files changed, 41 insertions, 0 deletions
diff --git a/net-analyzer/zabbix/files/zabbix-6.0.1-fix-server-crash.patch b/net-analyzer/zabbix/files/zabbix-6.0.1-fix-server-crash.patch
new file mode 100644
index 000000000000..e104fe5758f0
--- /dev/null
+++ b/net-analyzer/zabbix/files/zabbix-6.0.1-fix-server-crash.patch
@@ -0,0 +1,40 @@
+diff --git a/src/libs/zbxdbcache/dbconfig.c b/src/libs/zbxdbcache/dbconfig.c
+index f0f5f10..608c6e2 100644
+--- a/src/libs/zbxdbcache/dbconfig.c
++++ b/src/libs/zbxdbcache/dbconfig.c
+@@ -4128,6 +4128,9 @@ static void dc_schedule_trigger_timers(zbx_hashset_t *trend_queue, int now)
+ if (NULL == (trigger = (ZBX_DC_TRIGGER *)zbx_hashset_search(&config->triggers, &function->triggerid)))
+ continue;
+
++ if (ZBX_FLAG_DISCOVERY_PROTOTYPE == trigger->flags)
++ continue;
++
+ if (TRIGGER_STATUS_ENABLED != trigger->status || TRIGGER_FUNCTIONAL_TRUE != trigger->functional)
+ continue;
+
+@@ -5659,7 +5662,12 @@ static void dc_trigger_update_topology(void)
+
+ zbx_hashset_iter_reset(&config->triggers, &iter);
+ while (NULL != (trigger = (ZBX_DC_TRIGGER *)zbx_hashset_iter_next(&iter)))
++ {
++ if (ZBX_FLAG_DISCOVERY_PROTOTYPE == trigger->flags)
++ continue;
++
+ trigger->topoindex = 1;
++ }
+
+ DCconfig_sort_triggers_topologically();
+ }
+@@ -5806,6 +5814,12 @@ static void dc_trigger_update_cache(void)
+ continue;
+ }
+
++ if (ZBX_FLAG_DISCOVERY_PROTOTYPE == trigger->flags)
++ {
++ trigger->functional = TRIGGER_FUNCTIONAL_FALSE;
++ continue;
++ }
++
+ /* cache item - trigger link */
+ if (0 != item->update_triggers)
+ {
diff --git a/net-analyzer/zabbix/zabbix-6.0.1.ebuild b/net-analyzer/zabbix/zabbix-6.0.1-r1.ebuild
index 2f4dde8f1762..cac6ad8a798e 100644
--- a/net-analyzer/zabbix/zabbix-6.0.1.ebuild
+++ b/net-analyzer/zabbix/zabbix-6.0.1-r1.ebuild
@@ -361,6 +361,7 @@ RESTRICT="test"
PATCHES=(
"${FILESDIR}/${PN}-4.0.18-modulepathfix.patch"
"${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch"
+ "${FILESDIR}/${P}-fix-server-crash.patch"
)
S=${WORKDIR}/${MY_P}