The xml parser now returns incomplete instead of invalid encoding error when the buffer contains an invalid utf8 character (it might be at buffer end).

git-svn-id: http://voip.null.ro/svn/yate@3129 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2010-03-17 15:22:26 +00:00
parent d2a45bc08d
commit 83812e81e4
1 changed files with 2 additions and 2 deletions

View File

@ -128,8 +128,8 @@ bool XmlSaxParser::parse(const char* text)
m_buf << text;
if (m_buf.lenUtf8() == -1) {
//FIXME this should not be here in case we have a different encoding
Debug(this,DebugNote,"Request to parse invalid utf-8 data [%p]",this);
return setError(InvalidEncoding);
DDebug(this,DebugNote,"Request to parse invalid utf-8 data [%p]",this);
return setError(Incomplete);
}
if (unparsed()) {
if (unparsed() != Text) {