diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-12-27 18:34:39 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-12-27 18:34:39 +0000 |
commit | 09554d562e4d076bc5d1178d6e6f13eeae5f8f02 (patch) | |
tree | 84fdb3a34554543eb9154c8cbd9d653e1ca429f2 /src/zabbix_server/actions.c | |
parent | 461bb2a4ff683a38e6b2066f8c3fec67e110e44a (diff) | |
download | zabbix-09554d562e4d076bc5d1178d6e6f13eeae5f8f02.tar.gz zabbix-09554d562e4d076bc5d1178d6e6f13eeae5f8f02.tar.xz zabbix-09554d562e4d076bc5d1178d6e6f13eeae5f8f02.zip |
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@2434 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/zabbix_server/actions.c')
-rw-r--r-- | src/zabbix_server/actions.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/zabbix_server/actions.c b/src/zabbix_server/actions.c index aa897129..7b44cd09 100644 --- a/src/zabbix_server/actions.c +++ b/src/zabbix_server/actions.c @@ -520,7 +520,7 @@ void apply_actions(DB_TRIGGER *trigger,int alarmid,int trigger_value) now = time(NULL); /* snprintf(sql,sizeof(sql)-1,"select actionid,userid,delay,subject,message,scope,severity,recipient,good from actions where (scope=%d and triggerid=%d and good=%d and nextcheck<=%d) or (scope=%d and good=%d) or (scope=%d and good=%d)",ACTION_SCOPE_TRIGGER,trigger->triggerid,trigger_value,now,ACTION_SCOPE_HOST,trigger_value,ACTION_SCOPE_HOSTS,trigger_value);*/ - snprintf(sql,sizeof(sql)-1,"select actionid,userid,delay,subject,message,recipient,good,maxrepeats,repeatdelay from actions where nextcheck<=%d", now); + snprintf(sql,sizeof(sql)-1,"select actionid,userid,delay,subject,message,recipient,maxrepeats,repeatdelay from actions where nextcheck<=%d", now); result = DBselect(sql); zabbix_log( LOG_LEVEL_WARNING, "SQL [%s]", sql); @@ -537,10 +537,8 @@ void apply_actions(DB_TRIGGER *trigger,int alarmid,int trigger_value) strscpy(action.subject,DBget_field(result,i,3)); strscpy(action.message,DBget_field(result,i,4)); action.recipient=atoi(DBget_field(result,i,5)); - action.good=atoi(DBget_field(result,i,6)); - action.maxrepeats=atoi(DBget_field(result,i,7)); - action.repeatdelay=atoi(DBget_field(result,i,8)); - + action.maxrepeats=atoi(DBget_field(result,i,6)); + action.repeatdelay=atoi(DBget_field(result,i,7)); substitute_macros(trigger, &action, action.message); substitute_macros(trigger, &action, action.subject); |