Opened 13 years ago

Closed 13 years ago

#726 closed defect (fixed)

Garbage characters at end of provider registry messages.

Reported by: brentrobinson Owned by: brentrobinson
Priority: minor Milestone: 3.6.0
Component: FDO API Version: 3.6.0
Severity: 3 Keywords: Provider Registry readonly exception
Cc: External ID:

Description

Steps:

  • Set providers.xml (in same directory as fdo.dll) to read only
  • Using FdoProviderRegistry::RegisterProvider(), register a provider.

The resulting exception message will have garbage characters at the end.

Change History (1)

comment:1 by brentrobinson, 13 years ago

Resolution: fixed
Status: newclosed

Revision: 5829 Author: brentrobinson Date: 4:27:33 PM, Tuesday, November 23, 2010 Message: Ticket#726: Fix the formatting for FDO exception that occurs when one tries to register a new provider to a readonly providers.xml.

In this case, an exception from Xerces is trapped. The Xerces exception message is converted from XMLCh* to char* (via XMLString::transcode()) and formatted into an FDO exception message. However, the char* was getting formatted as wchar_t*, meaning that the FDO exception ended up with garbage characters.

XMLString::transcode() also converts the string to the current code page, which is a bit risky if the code page is not set to the character set for the string.

The fix was to convert the XMLCh* directly to wchar_t* before formatting into the FDO exception message.


Modified : /trunk/Fdo/Unmanaged/Src/Common/Xml/UtilXrcs.cpp Modified : /trunk/Fdo/Unmanaged/Src/Fdo/ClientServices/RegistryUtility.cpp Modified : /trunk/Fdo/Unmanaged/Src/Message/FDOMessage.mc

Note: See TracTickets for help on using tickets.