If version and/or encoding attributes are missing from XML declaration, assume the default values.

git-svn-id: http://voip.null.ro/svn/yate@4697 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
oana 2011-11-14 12:39:36 +00:00
parent c9a4ac3bf3
commit 0836ce10bd
1 changed files with 1 additions and 1 deletions

View File

@ -5728,7 +5728,7 @@ bool XmlToTcap::validDeclaration()
const NamedList& decl = m_decl->getDec();
NamedString* vers = decl.getParam(YSTRING("version"));
NamedString* enc = decl.getParam(YSTRING("encoding"));
if (TelEngine::null(vers) || (*vers != "1.0") || TelEngine::null(enc) || (*enc != "UTF-8"))
if ((!TelEngine::null(vers) && (*vers != "1.0")) || (!TelEngine::null(enc) && (*enc |= "UTF-8")))
return false;
return true;
}