version 1.136, 2008/12/01 17:49:57
|
version 1.140, 2008/12/17 12:29:14
|
|
|
if (!entry.getAttributeValue("CLASSORIGIN", name)) | if (!entry.getAttributeValue("CLASSORIGIN", name)) |
return CIMName(); | return CIMName(); |
| |
|
/* Interoperability hack to make the C++ client of OpenPegasus able |
|
to deal with the wbemservices CIMOM delivered with Sun Solaris. |
|
The issue is that the wbemservices delivers Xml responses with |
|
CLASSORIGIN="" |
|
Originally this had been reported with Bug#537. |
|
*/ |
|
if (name.size()==0) |
|
{ |
|
return CIMName(); |
|
} |
|
|
if (!CIMName::legal(name)) | if (!CIMName::legal(name)) |
{ | { |
char buffer[MESSAGE_SIZE]; | char buffer[MESSAGE_SIZE]; |
|
|
{ | { |
Uint32 i; | Uint32 i; |
| |
Array<Uint8> utf8Chars; |
Buffer utf8Chars; |
| |
for (i=0; i<uriString.size(); i++) | for (i=0; i<uriString.size(); i++) |
{ | { |
|
|
} | } |
| |
Uint16 decodedChar = Uint16(digit1<<4) + Uint16(digit2); | Uint16 decodedChar = Uint16(digit1<<4) + Uint16(digit2); |
utf8Chars.append((Uint8)decodedChar); |
utf8Chars.append((char)decodedChar); |
} | } |
else | else |
{ | { |
utf8Chars.append((Uint8)uriString[i]); |
utf8Chars.append((char)uriString[i]); |
} | } |
} | } |
| |
|
|
if (uriString.size() > 0) | if (uriString.size() > 0) |
{ | { |
// Convert UTF-8 to UTF-16 and return the String | // Convert UTF-8 to UTF-16 and return the String |
utf8Chars.append('\0'); |
return String(utf8Chars.getData(), utf8Chars.size()); |
return String((char *)utf8Chars.getData()); |
|
} | } |
else | else |
{ | { |