Don't add a choice parameter to the XML if it's optional and it doesn't have a tag.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5286 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
242e18f467
commit
5da6b7f7cc
|
@ -1264,8 +1264,8 @@ static bool decodeChoice(const Parameter* param, MapCamelType* type, AsnTag& tag
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
XmlElement* child = new XmlElement(param->name);
|
XmlElement* child = new XmlElement(param->name);
|
||||||
parent->addChild(child);
|
|
||||||
|
|
||||||
|
bool showDebug = !(param->tag == s_noTag && param->isOptional);
|
||||||
if (param->content) {
|
if (param->content) {
|
||||||
const Parameter* params= static_cast<const Parameter*>(param->content);
|
const Parameter* params= static_cast<const Parameter*>(param->content);
|
||||||
while (params && !TelEngine::null(params->name)) {
|
while (params && !TelEngine::null(params->name)) {
|
||||||
|
@ -1277,14 +1277,16 @@ static bool decodeChoice(const Parameter* param, MapCamelType* type, AsnTag& tag
|
||||||
}
|
}
|
||||||
if (checkEoC)
|
if (checkEoC)
|
||||||
ASNLib::matchEOC(data);
|
ASNLib::matchEOC(data);
|
||||||
|
parent->addChild(child);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (err != TcapXApplication::DataMissing) {
|
if (err != TcapXApplication::DataMissing && showDebug) {
|
||||||
if (__plugin.showMissing())
|
if (__plugin.showMissing())
|
||||||
Debug(&__plugin,DebugNote,"No valid choice in payload for '%s'",child->tag());
|
Debug(&__plugin,DebugNote,"No valid choice in payload for '%s'",child->tag());
|
||||||
err = TcapXApplication::DataMissing;
|
err = TcapXApplication::DataMissing;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
TelEngine::destruct(child);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue