summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-05 12:23:20 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-05 12:23:20 +0000
commit604ce300ed68ee4ac4fb6bcd74c2b4dec26cfb9e (patch)
tree3b9b3e78245161d9d5e89ba3d7b8ca960b870152 /src/libs
parentc9b5f984679804b7903866160533cd6515b74ad8 (diff)
- added server's parameter UnreachableDelay (Alexei)
- added server's parameter UnreachablePeriod (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@2801 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/zbxdbhigh/db.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/libs/zbxdbhigh/db.c b/src/libs/zbxdbhigh/db.c
index c0caf5ff..1961f939 100644
--- a/src/libs/zbxdbhigh/db.c
+++ b/src/libs/zbxdbhigh/db.c
@@ -869,16 +869,16 @@ void DBupdate_host_availability(int hostid,int available,int clock, char *error)
if(available == atoi(DBget_field(result,0,0)))
{
- if((available==HOST_AVAILABLE_FALSE)
- &&(clock+SLEEP_ON_UNREACHABLE>disable_until) )
+/* if((available==HOST_AVAILABLE_FALSE)
+ &&(clock+CONFIG_UNREACHABLE_PERIOD>disable_until) )
{
}
else
- {
+ {*/
zabbix_log(LOG_LEVEL_DEBUG, "Host already has availability [%d]",available);
DBfree_result(result);
return;
- }
+/* }*/
}
DBfree_result(result);
@@ -891,14 +891,15 @@ void DBupdate_host_availability(int hostid,int available,int clock, char *error)
}
else if(available==HOST_AVAILABLE_FALSE)
{
- if(disable_until+SLEEP_ON_UNREACHABLE>clock)
+/* if(disable_until+CONFIG_UNREACHABLE_PERIOD>clock)
{
- snprintf(sql,sizeof(sql)-1,"update hosts set available=%d,disable_until=disable_until+%d,error='%s' where hostid=%d",HOST_AVAILABLE_FALSE,SLEEP_ON_UNREACHABLE,error_esc,hostid);
+ snprintf(sql,sizeof(sql)-1,"update hosts set available=%d,disable_until=disable_until+%d,error='%s' where hostid=%d",HOST_AVAILABLE_FALSE,CONFIG_UNREACHABLE_DELAY,error_esc,hostid);
}
else
{
- snprintf(sql,sizeof(sql)-1,"update hosts set available=%d,disable_until=%d,error='%s' where hostid=%d",HOST_AVAILABLE_FALSE,clock+SLEEP_ON_UNREACHABLE,error_esc,hostid);
- }
+ snprintf(sql,sizeof(sql)-1,"update hosts set available=%d,disable_until=%d,error='%s' where hostid=%d",HOST_AVAILABLE_FALSE,clock+CONFIG_UNREACHABLE_DELAY,error_esc,hostid);
+ }*/
+ snprintf(sql,sizeof(sql)-1,"update hosts set available=%d,error='%s' where hostid=%d",HOST_AVAILABLE_FALSE,error_esc,hostid);
zabbix_log(LOG_LEVEL_DEBUG,"SQL [%s]",sql);
DBexecute(sql);
}