Fix getPropertyAt() returns Null instead of empty array (patch by Jan Safranek)

This commit is contained in:
Vitezslav Crhonek 2013-01-08 14:32:11 +01:00
parent 791a514f57
commit 8c48ee883b
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,29 @@
diff -up pegasus/src/Pegasus/ProviderManager2/CMPI/CMPISCMOUtilities.cpp.test pegasus/src/Pegasus/ProviderManager2/CMPI/CMPISCMOUtilities.cpp
--- pegasus/src/Pegasus/ProviderManager2/CMPI/CMPISCMOUtilities.cpp.test 2012-12-03 16:48:34.469370334 +0100
+++ pegasus/src/Pegasus/ProviderManager2/CMPI/CMPISCMOUtilities.cpp 2012-12-03 16:47:41.000000000 +0100
@@ -358,12 +358,6 @@ CMPIrc CMPISCMOUtilities::scmoValue2CMPI
data->value.uint64 = 0;
data->state = CMPI_goodValue;
- //Check for NULL CIMValue
- if( scmoValue == 0 )
- {
- data->state = CMPI_nullValue;
- return CMPI_RC_OK;
- }
if (type & CMPI_ARRAY)
{
@@ -398,6 +392,12 @@ CMPIrc CMPISCMOUtilities::scmoValue2CMPI
}
else
{
+ //Check for NULL CIMValue
+ if( scmoValue == 0 )
+ {
+ data->state = CMPI_nullValue;
+ return CMPI_RC_OK;
+ }
// Check for encpsulated type, which need special handling
if (type&CMPI_ENC)
{

View File

@ -8,7 +8,7 @@
Name: tog-pegasus
Version: %{major_ver}.0
Release: 9%{?dist}
Release: 10%{?dist}
Epoch: 2
Summary: OpenPegasus WBEM Services for Linux
@ -74,6 +74,8 @@ Patch23: pegasus-2.12.0-enable_interop_provider.patch
# Fixes tracing for CMPI messages with CMPI_DEV_DEBUG severity
#
Patch24: pegasus-2.12.0-cmpi-trace.patch
# 25: bz#883030, getPropertyAt() returns Null instead of empty array
Patch25: pegasus-2.12.0-empty_arrays.patch
BuildRequires: bash, sed, grep, coreutils, procps, gcc, gcc-c++
BuildRequires: libstdc++, make, pam-devel
@ -203,6 +205,7 @@ rm -rf pegasus/
%patch22 -p1 -b .null_value
%patch23 -p1 -b .enable_interop_provider
%patch24 -p1 -b .cmpi-trace
%patch25 -p1 -b .empty_arrays
%build
@ -468,6 +471,9 @@ fi
%changelog
* Tue Jan 08 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.12.0-10
- Fix getPropertyAt() returns Null instead of empty array (patch by Jan Safranek)
* Tue Dec 18 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.12.0-9
- Add cimprovagt wrapper for possibility of confining providers in SELinux,
update README.RedHat.Security accordingly, add provider specific wrapper