[Quickfix-developers] DataDictionary reading problem
Brought to you by:
orenmnero
From: Sergey G. <se...@mi...> - 2002-11-14 17:52:31
|
Hello, We've found the problem with code, which reads DataDictionary. The problem is that DataDictionary::readLibXml always adds current directory to the dictionary file name. As a result in case if the dictionary filename from config file is set as an absolute path, it can't find it. The other problem is that it's never got reported so there is no any error message and the only symptom is that down the road validation of some of the messages fails (which also can be reported or not). To fix the problem I've just changed the code so it wouldn't add the current directory to the file name and it seems to work ok (I've checked with both full and relative path examples). You can apply the following patch for the src/C++/DataDictionary.cpp : 332,335c332 < char buffer[ PATH_MAX ]; < getcwd( buffer, PATH_MAX ); < std::string current( buffer ); < current = current + "/" + url; --- > std::string current( url.c_str() ); There is still problem of reporting, I think DataDictionary::readLibXml should probably throw some exception in case if it can't open the dictionary... Cheers, -- Sergey |