Commit d1c62ca9 authored by Pavel Vainerman's avatar Pavel Vainerman

Исправил ошибку с использованием функции conf->findNode(),

т.к. она ищет везде (и в глубину и в ширину), а иногда требуется именно "на своём уровне".
parent bf3e27cb
......@@ -2218,7 +2218,11 @@ std::ostream& operator<<( std::ostream& os, const MBExchange::RSProperty& p )
// -----------------------------------------------------------------------------
void MBExchange::initDeviceList()
{
xmlNode* respNode = conf->findNode(cnode,"DeviceList");
xmlNode* respNode = 0;
UniXML* xml = conf->getConfXML();
if( xml )
respNode = xml->extFindNode(cnode,1,1,"DeviceList");
if( respNode )
{
UniXML_iterator it1(respNode);
......
......@@ -194,7 +194,11 @@ prefix(prefix)
// build file list...
xmlNode* fnode = conf->findNode(cnode,"filelist");
xmlNode* fnode = 0;
UniXML* xml = conf->getConfXML();
if( xml )
fnode = xml->extFindNode(cnode,1,1,"filelist");
if( fnode )
{
UniXML_iterator fit(fnode);
......
......@@ -673,7 +673,14 @@ void SharedMemory::buildHistoryList( xmlNode* cnode )
if( dlog.debugging(Debug::INFO) )
dlog[Debug::INFO] << myname << "(buildHistoryList): ..." << endl;
xmlNode* n = conf->findNode(cnode,"History");
UniXML* xml = conf->getConfXML();
if( !xml )
{
dlog[Debug::WARN] << myname << "(buildHistoryList): xml=NULL?!" << endl;
return;
}
xmlNode* n = xml->extFindNode(cnode,1,1,"History","");
if( !n )
{
dlog[Debug::WARN] << myname << "(buildHistoryList): <History> not found. ignore..." << endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment