Fix cmpi: CMGetKey() returns wrong data type for some data types
This commit is contained in:
parent
4be70bfbfe
commit
399e421272
60
pegasus-2.13.0-CMGetKey-data-type-fix.patch
Normal file
60
pegasus-2.13.0-CMGetKey-data-type-fix.patch
Normal file
@ -0,0 +1,60 @@
|
||||
Index: src/Pegasus/ProviderManager2/CMPI/CMPISCMOUtilities.cpp
|
||||
===================================================================
|
||||
RCS file: /cvs/MSB/pegasus/src/Pegasus/ProviderManager2/CMPI/CMPISCMOUtilities.cpp,v
|
||||
retrieving revision 1.4
|
||||
retrieving revision 1.5
|
||||
diff -u -r1.4 -r1.5
|
||||
--- src/Pegasus/ProviderManager2/CMPI/CMPISCMOUtilities.cpp 13 Feb 2013 11:40:04 -0000 1.4
|
||||
+++ src/Pegasus/ProviderManager2/CMPI/CMPISCMOUtilities.cpp 7 Apr 2014 09:52:59 -0000 1.5
|
||||
@@ -266,28 +266,14 @@
|
||||
data->value.boolean=scmoValue->simple.val.bin;
|
||||
data->type=CMPI_keyBoolean;
|
||||
break;
|
||||
-
|
||||
case CMPI_real32:
|
||||
- {
|
||||
- char buffer[128];
|
||||
- Uint32 size=0;
|
||||
- Real32ToString(buffer, scmoValue->simple.val.r32, size);
|
||||
- data->value.string = reinterpret_cast<CMPIString*>(
|
||||
- new CMPI_Object(buffer));
|
||||
- data->type=CIMKeyBinding::STRING;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
+ data->value.real32=(CMPIReal32)scmoValue->simple.val.r32;
|
||||
+ data->type=CMPI_real32;
|
||||
+ break;
|
||||
case CMPI_real64:
|
||||
- {
|
||||
- char buffer[128];
|
||||
- Uint32 size=0;
|
||||
- Real64ToString(buffer, scmoValue->simple.val.r64, size);
|
||||
- data->value.string = reinterpret_cast<CMPIString*>(
|
||||
- new CMPI_Object(buffer));
|
||||
- data->type=CIMKeyBinding::STRING;
|
||||
- break;
|
||||
- }
|
||||
+ data->value.real64=(CMPIReal64)scmoValue->simple.val.r64;
|
||||
+ data->type=CMPI_real64;
|
||||
+ break;
|
||||
|
||||
case CMPI_charsptr:
|
||||
case CMPI_chars:
|
||||
@@ -309,11 +295,11 @@
|
||||
|
||||
case CMPI_dateTime:
|
||||
{
|
||||
- char buffer[26];
|
||||
- _DateTimetoCStr(scmoValue->dateTimeValue, buffer);
|
||||
- data->value.string = reinterpret_cast<CMPIString*>(
|
||||
- new CMPI_Object(buffer));
|
||||
- data->type=CIMKeyBinding::STRING;
|
||||
+ CIMDateTime* cimdt =
|
||||
+ new CIMDateTime(&scmoValue->dateTimeValue);
|
||||
+ data->value.dateTime = reinterpret_cast<CMPIDateTime*>
|
||||
+ (new CMPI_Object(cimdt));
|
||||
+ data->type=CMPI_dateTime;
|
||||
break;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
Name: tog-pegasus
|
||||
Version: %{major_ver}.0
|
||||
Release: 13%{?dist}
|
||||
Release: 14%{?dist}
|
||||
Epoch: 2
|
||||
Summary: OpenPegasus WBEM Services for Linux
|
||||
|
||||
@ -81,12 +81,13 @@ Patch27: pegasus-2.13.0-build-fix.patch
|
||||
Patch28: pegasus-2.13.0-PG_ComputerSystem.CreationClassName.patch
|
||||
# 29: bz#1049314, allow unprivileged users to subscribe to indications by default
|
||||
Patch29: pegasus-2.13.0-enable-subscriptions-for-nonprivileged-users.patch
|
||||
# 30: Create x509v3 self-signed certificates with CA:FALSE
|
||||
Patch30: pegasus-2.13.0-SSLGeneration.patch
|
||||
# 31: bz#1111571, backported from upstream
|
||||
Patch31: pegasus-2.13.0-CMGetKey-data-type-fix.patch
|
||||
|
||||
BuildRequires: procps, libstdc++, pam-devel
|
||||
BuildRequires: openssl, openssl-devel
|
||||
# 30: Create x509v3 self-signed certificates with CA:FALSE
|
||||
Patch30: pegasus-2.13.0-SSLGeneration.patch
|
||||
|
||||
BuildRequires: bash, sed, grep, coreutils, procps, gcc, gcc-c++
|
||||
BuildRequires: libstdc++, make, pam-devel
|
||||
BuildRequires: openssl-devel
|
||||
@ -229,6 +230,7 @@ yes | mak/CreateDmtfSchema 238 %{SOURCE9} cim_schema_2.38.0
|
||||
%patch28 -p0 -b .PG_ComputerSystem.CreationClassName
|
||||
%patch29 -p1 -b .enable-subscriptions-for-nonprivileged-users
|
||||
%patch30 -p1 -b .genssl
|
||||
%patch31 -p0 -b .CMGetKey-data-type-fix
|
||||
|
||||
|
||||
%build
|
||||
@ -505,6 +507,10 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Jul 01 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.13.0-14
|
||||
- Fix cmpi: CMGetKey() returns wrong data type for some data types
|
||||
Resolves: #1111571
|
||||
|
||||
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:2.13.0-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user