summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsdserialize_xml.cpp
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2008-02-07 17:15:18 +0000
committerJosh Bell <josh@lindenlab.com>2008-02-07 17:15:18 +0000
commit8bd6a0b3217ea5614d2a29195e528aa8314f6342 (patch)
treebe5cee5be0678bb03c7174bab9296cfc530d0102 /indra/llcommon/llsdserialize_xml.cpp
parent3314f78a3673c1250e47722848c60d017dafac97 (diff)
svn merge -r 79445:79449 svn+ssh://svn.lindenlab.com/svn/linden/qa/maintenance-5-merge-79386
QAR-242 merge of maintenance-5 (QAR-203) * DEV-6548 Copy To Inventory fail to execute without any output feedback when Notecard has changes but not saved * DEV-7600 Deleting someone else's object in god mode crashes sim * DEV-5329 LLSD parsers should determine and set maximum parse sizes * DEV-7473 Resolve instant message crash report * DEV-2904 Presence Issues not (apparently) caused by scripted attachments * DEV-7083 Investigate Null Folder IDs Bug that caused 470K inventory items with Null Folder IDS on the Grid * DEV-2865 Textures/Snapshots in a notecard are opened again when you click copy to inventory. * DEV-6612 VWR-3290: Linux scons build script doesn't work with distcc * DEV-8002 c++ llsd notation parser accepts malformed data * DEV-8001 c++ xml parse returns wrong number of elements parsed * DEV-8089 Double delete in statc structured data parse functions * DEV-5326 Any viewer can request presence information for any agent * DEV-2378 python service builder does not sort query string * DEV-7872 Block teleport off teen grid sub-estates like Schome Park / Open University * DEV-4465 Add a "logfile" command line option to the sim to create log files
Diffstat (limited to 'indra/llcommon/llsdserialize_xml.cpp')
-rw-r--r--indra/llcommon/llsdserialize_xml.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp
index 6232622298..b3596e8705 100644
--- a/indra/llcommon/llsdserialize_xml.cpp
+++ b/indra/llcommon/llsdserialize_xml.cpp
@@ -305,6 +305,7 @@ private:
XML_Parser mParser;
LLSD mResult;
+ S32 mParseCount;
bool mInLLSDElement;
bool mGracefullStop;
@@ -411,12 +412,12 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data)
}
llinfos << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << llendl;
data = LLSD();
- return -1;
+ return LLSDParser::PARSE_FAILURE;
}
clear_eol(input);
data = mResult;
- return 1;
+ return mParseCount;
}
void LLSDXMLParser::Impl::reset()
@@ -428,6 +429,7 @@ void LLSDXMLParser::Impl::reset()
}
mResult.clear();
+ mParseCount = 0;
mInLLSDElement = false;
mDepth = 0;
@@ -472,7 +474,7 @@ LLSDXMLParser::Impl::findAttribute(const XML_Char* name, const XML_Char** pairs)
return NULL;
}
-void LLSDXMLParser::Impl::parsePart(const char *buf, int len)
+void LLSDXMLParser::Impl::parsePart(const char* buf, int len)
{
void * buffer = XML_GetBuffer(mParser, len);
if (buffer != NULL && buf != NULL)
@@ -486,7 +488,7 @@ void LLSDXMLParser::Impl::parsePart(const char *buf, int len)
void LLSDXMLParser::Impl::startElementHandler(const XML_Char* name, const XML_Char** attributes)
{
- mDepth += 1;
+ ++mDepth;
if (mSkipping)
{
return;
@@ -554,6 +556,7 @@ void LLSDXMLParser::Impl::startElementHandler(const XML_Char* name, const XML_Ch
return startSkipping();
}
+ ++mParseCount;
switch (element)
{
case ELEMENT_MAP:
@@ -572,7 +575,7 @@ void LLSDXMLParser::Impl::startElementHandler(const XML_Char* name, const XML_Ch
void LLSDXMLParser::Impl::endElementHandler(const XML_Char* name)
{
- mDepth -= 1;
+ --mDepth;
if (mSkipping)
{
if (mDepth < mSkipThrough)
@@ -715,10 +718,10 @@ LLSDXMLParser::Impl::Element LLSDXMLParser::Impl::readElement(const XML_Char* na
-
-
-LLSDXMLParser::LLSDXMLParser()
- : impl(* new Impl)
+/**
+ * LLSDXMLParser
+ */
+LLSDXMLParser::LLSDXMLParser() : impl(* new Impl)
{
}
@@ -733,7 +736,7 @@ void LLSDXMLParser::parsePart(const char *buf, int len)
}
// virtual
-S32 LLSDXMLParser::parse(std::istream& input, LLSD& data) const
+S32 LLSDXMLParser::doParse(std::istream& input, LLSD& data) const
{
return impl.parse(input, data);
}