diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-04-01 19:43:28 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-04-01 19:43:28 +0000 |
| commit | 613ee1356c271122eb498c6aadd04af2eb047df1 (patch) | |
| tree | c05beb4ea785307e680ce81b3e072558b944e435 /src | |
| parent | b74a423e7815b55d8b1173176518aa657191578f (diff) | |
| download | zabbix-613ee1356c271122eb498c6aadd04af2eb047df1.tar.gz zabbix-613ee1356c271122eb498c6aadd04af2eb047df1.tar.xz zabbix-613ee1356c271122eb498c6aadd04af2eb047df1.zip | |
Added column actionid to table alerts.
git-svn-id: svn://svn.zabbix.com/trunk@22 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src')
| -rw-r--r-- | src/zabbix_alarmer/zabbix_alarmer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/zabbix_alarmer/zabbix_alarmer.c b/src/zabbix_alarmer/zabbix_alarmer.c index 8852be0e..7750d5c8 100644 --- a/src/zabbix_alarmer/zabbix_alarmer.c +++ b/src/zabbix_alarmer/zabbix_alarmer.c @@ -129,7 +129,7 @@ void send_mail(char *smtp_server,char *smtp_helo,char *smtp_email,char *mailto,c free(c); } -void send_to_user(int userid,char *smtp_server,char *smtp_helo,char *smtp_email,char *subject,char *message) +void send_to_user(int actionid,int userid,char *smtp_server,char *smtp_helo,char *smtp_email,char *subject,char *message) { MEDIA media; char c[1024]; @@ -155,7 +155,7 @@ void send_to_user(int userid,char *smtp_server,char *smtp_helo,char *smtp_email, { dbg_write( dbg_proginfo, "Email sending to %s %s Subject:%s Message:%s to %d\n", media.type, media.sendto, subject, message, userid ); send_mail(smtp_server,smtp_helo,smtp_email,media.sendto,subject,message); - sprintf(c,"insert into alerts (alertid,clock,type,sendto,subject,message) values (NULL,unix_timestamp(),'%s','%s','%s','%s');",media.type,media.sendto,subject,message); + sprintf(c,"insert into alerts (alertid,actionid,clock,type,sendto,subject,message) values (NULL,%d,unix_timestamp(),'%s','%s','%s','%s');",actionid,media.type,media.sendto,subject,message); DBexecute(c); } else @@ -214,7 +214,7 @@ void apply_actions(int triggerid,int good) substitute_functions(&*action.message); substitute_functions(&*action.subject); - send_to_user(action.userid,smtp_server,smtp_helo,smtp_email,action.subject,action.message); + send_to_user(action.actionid,action.userid,smtp_server,smtp_helo,smtp_email,action.subject,action.message); sprintf(c,"update actions set nextcheck=unix_timestamp()+%d where actionid=%d",action.delay,action.actionid); DBexecute(c); } |
