summaryrefslogtreecommitdiffstats
path: root/src/zabbix_server/timer
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-01-08 16:13:49 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-01-08 16:13:49 +0000
commitea6bdbcf952e5ac4696cb91364c1923f6ab96321 (patch)
tree06184b10a3e0231b7c18d9cf6a66f2a3a6f97f8c /src/zabbix_server/timer
parent8f08a8271468cf8285f000ac4c0b25e12f1d596b (diff)
downloadzabbix-ea6bdbcf952e5ac4696cb91364c1923f6ab96321.tar.gz
zabbix-ea6bdbcf952e5ac4696cb91364c1923f6ab96321.tar.xz
zabbix-ea6bdbcf952e5ac4696cb91364c1923f6ab96321.zip
- improved databases determination of configuration script (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3664 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/zabbix_server/timer')
-rw-r--r--src/zabbix_server/timer/Makefile.am2
-rw-r--r--src/zabbix_server/timer/timer.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/zabbix_server/timer/Makefile.am b/src/zabbix_server/timer/Makefile.am
index 1a9efcc2..338d5e3a 100644
--- a/src/zabbix_server/timer/Makefile.am
+++ b/src/zabbix_server/timer/Makefile.am
@@ -1,4 +1,4 @@
SUBDIRS=
-INCLUDES=-I@top_srcdir@/include @MYSQL_INCLUDE@ @ORACLE_INCLUDE@ @PGSQL_INCLUDE@
+INCLUDES=-I@top_srcdir@/include @MYSQL_CFLAGS@ @ORACLE_INCLUDE@ @POSTGRESQL_CFLAGS@
lib_LIBRARIES=libzbxtimer.a
libzbxtimer_a_SOURCES=timer.c
diff --git a/src/zabbix_server/timer/timer.c b/src/zabbix_server/timer/timer.c
index 6a08fbb6..a5ff96db 100644
--- a/src/zabbix_server/timer/timer.c
+++ b/src/zabbix_server/timer/timer.c
@@ -83,7 +83,7 @@ void main_timer_loop()
now=time(NULL);
/*
-#ifdef HAVE_PGSQL
+#ifdef HAVE_POSTGRESQL
zbx_snprintf(sql,sizeof(sql),"select distinct f.itemid,f.functionid,f.parameter from functions f, items i,hosts h where h.hostid=i.hostid and h.status=%d and i.itemid=f.itemid and f.function in ('nodata','date','dayofweek','time','now') and i.lastclock+f.parameter::text::integer<=%d and i.status=%d", HOST_STATUS_MONITORED, now, ITEM_STATUS_ACTIVE);
#else
zbx_snprintf(sql,sizeof(sql),"select distinct f.itemid,f.functionid,f.parameter,f.function from functions f, items i,hosts h where h.hostid=i.hostid and h.status=%d and i.itemid=f.itemid and f.function in ('nodata','date','dayofweek','time','now') and i.lastclock+f.parameter<=%d and i.status=%d", HOST_STATUS_MONITORED, now, ITEM_STATUS_ACTIVE);