fixed broken attributes "instance" and "dataType" of NXSL class "DCI"
authorVictor Kirhenshtein <victor@netxms.org>
Mon, 2 May 2016 17:31:44 +0000 (20:31 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Mon, 2 May 2016 17:31:44 +0000 (20:31 +0300)
src/server/core/nxsl_classes.cpp

index 831892c..ca5adbc 100644 (file)
@@ -1082,7 +1082,7 @@ NXSL_Value *NXSL_DciClass::getAttr(NXSL_Object *object, const TCHAR *attr)
    }
    else if (!_tcscmp(attr, _T("dataType")) && (dci->getType() == DCO_TYPE_ITEM))
    {
-               value = new NXSL_Value((LONG)((DCItem *)dci)->getDataType());
+               value = new NXSL_Value(dci->getDataType());
    }
    else if (!_tcscmp(attr, _T("description")))
    {
@@ -1098,7 +1098,7 @@ NXSL_Value *NXSL_DciClass::getAttr(NXSL_Object *object, const TCHAR *attr)
    }
    else if ((dci->getType() == DCO_TYPE_ITEM) && !_tcscmp(attr, _T("instance")))
    {
-               value = new NXSL_Value(((DCItem *)dci)->getInstance());
+               value = new NXSL_Value(dci->getInstance());
    }
    else if (!_tcscmp(attr, _T("lastPollTime")))
    {