summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkarl <karl>2005-08-23 17:44:26 +0000
committerkarl <karl>2005-08-23 17:44:26 +0000
commit6b023737e9e101747e59ec3e26358486c49dd7e5 (patch)
tree811afdacce23e6ddf778969b7eaf01a2138b5e20 /src
parentc73e0da4eb3e7ce3c22aa9b012134b0255cef3f4 (diff)
downloadtog-pegasus-6b023737e9e101747e59ec3e26358486c49dd7e5.zip
tog-pegasus-6b023737e9e101747e59ec3e26358486c49dd7e5.tar.gz
tog-pegasus-6b023737e9e101747e59ec3e26358486c49dd7e5.tar.xz
BUG#: 3803
TITLE: Classinfo attribute in SLP Template DESCRIPTION: Was acquiring the attribute as a string and should have been uint16. Modified. Now produces either a) no attribute at all if there are no ClassInfo properties in the instances or b) list of the property values for each classInfo with 0 as the default if there are any valid classinfo properties in the CIM_namespace instances. Note that there is still an issue between the DMTF specs and the SNIA SMIs spec in that the dmtf spec defines the property value and the SNIA defines the value qualifier as output. We are following the DMTF spec at this point.
Diffstat (limited to 'src')
-rw-r--r--src/Providers/slp/SLPProvider.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/Providers/slp/SLPProvider.cpp b/src/Providers/slp/SLPProvider.cpp
index 5061e46..a5015f2 100644
--- a/src/Providers/slp/SLPProvider.cpp
+++ b/src/Providers/slp/SLPProvider.cpp
@@ -638,7 +638,7 @@ String SLPProvider::getRegisteredProfileList()
CIMPropertyList());
}
- catch (Exception& e)
+ catch (Exception &)
{
CDEBUG("SLPProvider::getRegisteredProfiles: get class error");
@@ -666,7 +666,7 @@ String SLPProvider::getRegisteredProfileList()
}
- catch (Exception& e)
+ catch (Exception &)
{
CDEBUG("SLPProvider::getRegisteredProfiles: enum instances error");
Logger::put(Logger::ERROR_LOG, SlpProvider, Logger::SEVERE,
@@ -755,7 +755,7 @@ String SLPProvider::getNameSpaceInfo(const CIMNamespaceName& nameSpace, String&
Boolean classInfoFound = false;
for (Uint32 i = 0 ; i < CIMNamespaceInstances.size() ; i++)
{
- if (_getPropertyValueString(CIMNamespaceInstances[i], CIMName(classinfoAttribute), String::EMPTY) != String::EMPTY)
+ if (_getPropertyValueUint16(CIMNamespaceInstances[i], CIMName(classinfoAttribute)) != 0)
{
classInfoFound = true;
break;
@@ -764,19 +764,24 @@ String SLPProvider::getNameSpaceInfo(const CIMNamespaceName& nameSpace, String&
// Extract the namespace names and class info from the objects.
for (Uint32 i = 0 ; i < CIMNamespaceInstances.size() ; i++)
{
- String temp = _getPropertyValueString(CIMNamespaceInstances[i], CIMName(namePropertyName), "");
+ String temp = _getPropertyValueString(CIMNamespaceInstances[i],
+ CIMName(namePropertyName), "");
if (temp != String::EMPTY)
{
_appendCSV(names, temp);
- // Append to ClassInfo only if there is at least one valid classinfo property provided
+ // Append to ClassInfo only if at least one valid classinfo property provided
if (classInfoFound)
{
- // Insert either the Class info or a "" indicating none at this position.
- _appendCSV(classInfo, _getPropertyValueString(CIMNamespaceInstances[i], CIMName(classinfoAttribute), "\"\""));
+ // Append the Classinfo property value into the string for the attribute.
+ char buffer[32];
+ sprintf(buffer, "%u",_getPropertyValueUint16(CIMNamespaceInstances[i],
+ CIMName(classinfoAttribute)));
+ _appendCSV(classInfo, buffer);
}
}
else
- CDEBUG("Must log error here if property not found");
+ Logger::put(Logger::ERROR_LOG, SlpProvider, Logger::WARNING,
+ "SLP Registration bypassed Namespace attribute: $0 property error in CIM_Namespace class.");
}
@@ -1166,7 +1171,7 @@ Boolean SLPProvider::issueSLPRegistrations()
CIMName(CIMObjectManagerClassName),
false, false, false,false, CIMPropertyList());
}
- catch (const Exception& e)
+ catch (const Exception &)
{
CDEBUG("Exception caught on enumerateInstances(CIM_ObjectManager):=" << e.getMessage());
}