- Malawi hotfix - ignore unknown statuses in uptime calculation
authorAlex Kalimulin <alex@netxms.org>
Thu, 15 Sep 2011 11:31:23 +0000 (11:31 +0000)
committerAlex Kalimulin <alex@netxms.org>
Thu, 15 Sep 2011 11:31:23 +0000 (11:31 +0000)
src/server/core/svccontainer.cpp

index 2ffc7c2..5dfcabc 100644 (file)
@@ -260,6 +260,8 @@ double ServiceContainer::getUptimeFromDBFor(Period period, LONG *downtime)
                        {
                                changeTimestamp = DBGetFieldLong(hResult, i, 0);
                                newStatus = DBGetFieldLong(hResult, i, 1);
+                               if (newStatus == STATUS_UNKNOWN) // Malawi hotfix - ignore unknown status
+                                       continue;
                                if (newStatus == STATUS_NORMAL)
                                        *downtime += (LONG)(changeTimestamp - prevChangeTimestamp);
                                else