summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/db.c2
-rw-r--r--src/zabbix_server/server.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/db.c b/include/db.c
index 09474854..f46f2e82 100644
--- a/include/db.c
+++ b/include/db.c
@@ -2342,6 +2342,6 @@ void DBget_item_from_db(DB_ITEM *item,DB_RESULT *result, int row)
item->snmpv3_authpassphrase = DBget_field(result,i,27);
item->snmpv3_privpassphrase = DBget_field(result,i,28);
item->formula = DBget_field(result,i,29);
- item->host_status=atoi(DBget_field(result,i,30));
+ item->host_available=atoi(DBget_field(result,i,30));
}
diff --git a/src/zabbix_server/server.c b/src/zabbix_server/server.c
index d37c4775..6abc1caa 100644
--- a/src/zabbix_server/server.c
+++ b/src/zabbix_server/server.c
@@ -633,7 +633,7 @@ int get_values(void)
}
/* if(HOST_STATUS_UNREACHABLE == item.host_status)*/
- if(HOST_AVAILABLE_FALSE == item.host_available)
+ if(HOST_AVAILABLE_TRUE != item.host_available)
{
item.host_available=HOST_AVAILABLE_TRUE;
zabbix_log( LOG_LEVEL_WARNING, "Enabling host [%s]", item.host );
@@ -659,7 +659,7 @@ int get_values(void)
DBupdate_item_status_to_notsupported(item.itemid, error);
#endif
/* if(HOST_STATUS_UNREACHABLE == item.host_status)*/
- if(HOST_AVAILABLE_FALSE == item.host_available)
+ if(HOST_AVAILABLE_TRUE != item.host_available)
{
item.host_available=HOST_AVAILABLE_TRUE;
zabbix_log( LOG_LEVEL_WARNING, "Enabling host [%s]", item.host );