From cfcce2e48100db5d067703120c4aa131f712c991 Mon Sep 17 00:00:00 2001 From: sasha Date: Mon, 2 Jun 2008 12:10:22 +0000 Subject: - [DEV-173] added support of notification escalations on server side git-svn-id: svn://svn.zabbix.com/trunk@5739 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- src/libs/zbxdbhigh/db.c | 8 +++++--- src/zabbix_server/actions.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/libs/zbxdbhigh/db.c b/src/libs/zbxdbhigh/db.c index 0724e0df..1a7c609c 100644 --- a/src/libs/zbxdbhigh/db.c +++ b/src/libs/zbxdbhigh/db.c @@ -1582,12 +1582,14 @@ int DBstart_escalation(zbx_uint64_t actionid, zbx_uint64_t triggerid, zbx_uint64 return SUCCEED; } -int DBstop_escalation(zbx_uint64_t actionid, zbx_uint64_t triggerid) +int DBstop_escalation(zbx_uint64_t actionid, zbx_uint64_t triggerid, zbx_uint64_t eventid) { - DBexecute("update escalations set status=%d,nextcheck=0 where actionid=" ZBX_FS_UI64 " and triggerid=" ZBX_FS_UI64, + DBexecute("update escalations set status=%d,nextcheck=0 where actionid=" ZBX_FS_UI64 + " and triggerid=" ZBX_FS_UI64 " and eventid = " ZBX_FS_UI64, ESCALATION_STATUS_RECOVERY, actionid, - triggerid); + triggerid, + eventid); return SUCCEED; } diff --git a/src/zabbix_server/actions.c b/src/zabbix_server/actions.c index f52dad8f..1323ff8e 100644 --- a/src/zabbix_server/actions.c +++ b/src/zabbix_server/actions.c @@ -840,7 +840,7 @@ void process_actions(DB_EVENT *event) zabbix_log( LOG_LEVEL_DEBUG, "Conditions do not match our event. Do not execute operations."); if (event->source == EVENT_SOURCE_TRIGGERS && event->object == EVENT_OBJECT_TRIGGER) - DBstop_escalation(action.actionid, event->objectid); + DBstop_escalation(action.actionid, event->objectid, event->eventid); } } DBfree_result(result); -- cgit