summaryrefslogtreecommitdiffstats
path: root/src/zabbix_server/timer
diff options
context:
space:
mode:
authorsasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-02-11 12:10:03 +0000
committersasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-02-11 12:10:03 +0000
commit99bd8136a8237e57ea41b4291c8550df9a3f75a4 (patch)
treed65c9b96e7e8bb10c684c5d2d0d5371594abe7f9 /src/zabbix_server/timer
parent561ec32efae13fe50823559834912927b4dad351 (diff)
downloadzabbix-99bd8136a8237e57ea41b4291c8550df9a3f75a4.tar.gz
zabbix-99bd8136a8237e57ea41b4291c8550df9a3f75a4.tar.xz
zabbix-99bd8136a8237e57ea41b4291c8550df9a3f75a4.zip
- [DEV-109] Server changes - Timer
git-svn-id: svn://svn.zabbix.com/trunk@5339 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/zabbix_server/timer')
-rw-r--r--src/zabbix_server/timer/timer.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/zabbix_server/timer/timer.c b/src/zabbix_server/timer/timer.c
index 69dbdf57..b4772139 100644
--- a/src/zabbix_server/timer/timer.c
+++ b/src/zabbix_server/timer/timer.c
@@ -56,8 +56,7 @@ void main_timer_loop()
DB_RESULT result;
DB_ROW row;
- for(;;)
- {
+ for (;;) {
zbx_setproctitle("updating nodata() functions");
DBconnect(ZBX_DB_CONNECT_NORMAL);
@@ -71,14 +70,15 @@ void main_timer_loop()
#endif
*/
- result = DBselect("select distinct %s, functions f where h.hostid=i.hostid and h.status=%d and i.status=%d and f.function in ('nodata','date','dayofweek','time','now') and i.itemid=f.itemid and" ZBX_COND_NODEID,
- ZBX_SQL_ITEM_SELECT,
- HOST_STATUS_MONITORED,
- ITEM_STATUS_ACTIVE,
- LOCAL_NODE("h.hostid"));
+ result = DBselect("select distinct %s, functions f where h.hostid=i.hostid and h.status=%d"
+ " and i.status=%d and f.function in ('nodata','date','dayofweek','time','now')"
+ " and i.itemid=f.itemid" DB_NODE,
+ ZBX_SQL_ITEM_SELECT,
+ HOST_STATUS_MONITORED,
+ ITEM_STATUS_ACTIVE,
+ DBnode_local("h.hostid"));
- while((row=DBfetch(result)))
- {
+ while (NULL != (row = DBfetch(result))) {
DBget_item_from_db(&item,row);
DBbegin();