summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-01-11 20:02:44 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-01-11 20:02:44 +0000
commitfb82fb4385c95df5cb219ee078b84888a100a5de (patch)
tree6e6d8b2b0b2299501c6d5b5f54e49774491ee710 /include
parent899b118cbc8fe9c67fc8a6542bae3048b19238c8 (diff)
- fixed sending of alerts when PostgreSQL is used (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1171 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'include')
-rw-r--r--include/db.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/db.c b/include/db.c
index 10101e59..aa9ff525 100644
--- a/include/db.c
+++ b/include/db.c
@@ -1050,7 +1050,9 @@ int DBadd_alert(int actionid, int mediatypeid, char *sendto, char *subject, char
zabbix_log(LOG_LEVEL_DEBUG,"In add_alert()");
now = time(NULL);
- snprintf(sql,sizeof(sql)-1,"insert into alerts (alertid,actionid,clock,mediatypeid,sendto,subject,message,status,retries) values (NULL,%d,%d,%d,'%s','%s','%s',0,0)",actionid,now,mediatypeid,sendto,subject,message);
+/* Does not work on PostgreSQL */
+/* snprintf(sql,sizeof(sql)-1,"insert into alerts (alertid,actionid,clock,mediatypeid,sendto,subject,message,status,retries) values (NULL,%d,%d,%d,'%s','%s','%s',0,0)",actionid,now,mediatypeid,sendto,subject,message);*/
+ snprintf(sql,sizeof(sql)-1,"insert into alerts (actionid,clock,mediatypeid,sendto,subject,message,status,retries) values (%d,%d,%d,'%s','%s','%s',0,0)",actionid,now,mediatypeid,sendto,subject,message);
DBexecute(sql);
return SUCCEED;