diff options
author | Don Kjer <don@lindenlab.com> | 2007-05-01 21:39:25 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2007-05-01 21:39:25 +0000 |
commit | 4ecb9cb63e4993b3b4bc65d73ed255139b5c3f75 (patch) | |
tree | 48d9bb9a1ae468ecdbd53cf21a598d66ee8eced3 /indra/llcommon/llsdserialize_xml.cpp | |
parent | f5e9ce7e47694e349a4eb28b052016b11e1bdf81 (diff) |
svn merge -r 59163:61099 svn+ssh://svn/svn/linden/branches/release-candidate into release
Diffstat (limited to 'indra/llcommon/llsdserialize_xml.cpp')
-rw-r--r-- | indra/llcommon/llsdserialize_xml.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp index 796cd9f9f4..c5ab369d0f 100644 --- a/indra/llcommon/llsdserialize_xml.cpp +++ b/indra/llcommon/llsdserialize_xml.cpp @@ -234,7 +234,7 @@ public: Impl(); ~Impl(); - LLSD parse(std::istream& input); + S32 parse(std::istream& input, LLSD& data); void parsePart(const char *buf, int len); @@ -336,7 +336,7 @@ static unsigned get_till_eol(std::istream& input, char *buf, unsigned bufsize) return count; } -LLSD LLSDXMLParser::Impl::parse(std::istream& input) +S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data) { reset(); XML_Status status; @@ -380,11 +380,13 @@ LLSD LLSDXMLParser::Impl::parse(std::istream& input) { ((char*) buffer)[count? count - 1 : 0] = '\0'; llinfos << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << llendl; - return LLSD(); + data = LLSD(); + return -1; } clear_eol(input); - return mResult; + data = mResult; + return 1; } void LLSDXMLParser::Impl::reset() @@ -703,6 +705,5 @@ void LLSDXMLParser::parsePart(const char *buf, int len) // virtual S32 LLSDXMLParser::parse(std::istream& input, LLSD& data) const { - data = impl.parse(input); - return 0; + return impl.parse(input, data); } |