From: Narasimha S. <nsh...@us...> - 2011-03-30 17:58:55
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCC - Small Footprint CIM Client". The branch, master has been updated via 2654341affe0c249aee6060bfa9fa598d4712961 (commit) from 705df8e8c466bd097920c5c2b8f77d26fab748e7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2654341affe0c249aee6060bfa9fa598d4712961 Author: Narasimha Sharoff <nsh...@us...> Date: Wed Mar 30 10:57:18 2011 -0700 [ 2967257 ] Use of CMPI_chars in SFCC. General CMPI specification bug ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 26da31a..1f7e77d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-03-30 Narasimha Sharoff <nsh...@us...> + + * backend/cimxml/value.c frontend/cpp/CimData.cpp ; sfcclient.c + [ 2967257 ] Use of CMPI_chars in SFCC. General CMPI specification bug + (patch by Klaus Kampf) + 2011-03-29 Chris Buccella <buc...@li...> * backend/cimxml/client.c: diff --git a/NEWS b/NEWS index 184cfd1..26229f8 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,7 @@ Bugs: - 2990315: cmciRelease not called in case of error - 3196128: enumInstances does not set NameSpace in ObjectPath in XML mode - 1956407: CIM-XML/HTTP connection to unix socket +- 2967257: Use of CMPI_chars in SFCC. General CMPI specification bug Changes in 2.2.1 ================ diff --git a/TEST/print-types.c b/TEST/print-types.c index a3a1fa4..7d32819 100644 --- a/TEST/print-types.c +++ b/TEST/print-types.c @@ -86,7 +86,7 @@ main() PRINT_TYPE(CMPI_numericString); PRINT_TYPE(CMPI_booleanString); PRINT_TYPE(CMPI_dateTimeString); - PRINT_TYPE(CMPI_classNameString); + // PRINT_TYPE(CMPI_classNameString); /* Deprecated SF#2967247 */ PRINT_TYPE(CMPI_nameString); PRINT_TYPE(CMPI_goodValue); diff --git a/backend/cimxml/value.c b/backend/cimxml/value.c index b9471a8..e484bdb 100644 --- a/backend/cimxml/value.c +++ b/backend/cimxml/value.c @@ -178,11 +178,14 @@ static char *value2CharsUri(CMPIType type, CMPIValue * value, int uri) case CMPI_filter: break; + case CMPI_chars: + return strdup(value->chars ? (char*)value->chars : "NULL"); + case CMPI_string: case CMPI_numericString: case CMPI_booleanString: case CMPI_dateTimeString: - case CMPI_classNameString: + //case CMPI_classNameString: /* Deprecated SF#2967257 */ return strdup(value->string ? (char*)value->string->hdl : "NULL"); case CMPI_dateTime: diff --git a/frontend/cpp/CimData.cpp b/frontend/cpp/CimData.cpp index 5ed0cdf..9f55b5d 100644 --- a/frontend/cpp/CimData.cpp +++ b/frontend/cpp/CimData.cpp @@ -143,9 +143,12 @@ CimData::operator CimString() const { } CimData::operator const char* () const { - if (_data.type!=CIMC_string) + if (_data.type == CIMC_string) + return (const char *)cim.string; + else if (_data.type == CIMC_chars) + return _data.value.chars; + else throw CimStatus(CIMC_RC_ERR_TYPE_MISMATCH); - else return (const char*)cim.string; } CimData::operator CimDateTime() const { diff --git a/frontend/sfcc/sfcclient.c b/frontend/sfcc/sfcclient.c index 2418410..89736ad 100644 --- a/frontend/sfcc/sfcclient.c +++ b/frontend/sfcc/sfcclient.c @@ -245,11 +245,15 @@ char * value2Chars (CMPIType type, CMPIValue *value) case CMPI_filter: break; + case CMPI_chars: + return strdup(value->chars ? (char*)value->chars : "NULL"); + break; + case CMPI_string: case CMPI_numericString: case CMPI_booleanString: case CMPI_dateTimeString: - case CMPI_classNameString: + //case CMPI_classNameString: /* Deprecated SF# 2967257 */ return strdup((value->string && value->string->hdl) ? (char*)value->string->hdl : "NULL"); hooks/post-receive -- SFCC - Small Footprint CIM Client |