diff options
Diffstat (limited to 'src/Xml2XmlRpcRequestProcessor.cc')
| -rw-r--r-- | src/Xml2XmlRpcRequestProcessor.cc | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/src/Xml2XmlRpcRequestProcessor.cc b/src/Xml2XmlRpcRequestProcessor.cc index c2e69ef1..c30998bb 100644 --- a/src/Xml2XmlRpcRequestProcessor.cc +++ b/src/Xml2XmlRpcRequestProcessor.cc @@ -16,7 +16,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * In addition, as a special exception, the copyright holders give * permission to link the code of portions of this program with the @@ -56,7 +56,7 @@ struct SessionData { }; static void mlStartElement(void* userData, const xmlChar* name, - const xmlChar** attrs) + const xmlChar** attrs) { SessionData* sd = reinterpret_cast<SessionData*>(userData); std::map<std::string, std::string> attrmap; @@ -66,7 +66,7 @@ static void mlStartElement(void* userData, const xmlChar* name, std::string name = reinterpret_cast<const char*>(*p); ++p; if(*p == 0) { - break; + break; } std::string value = util::trim(reinterpret_cast<const char*>(*p)); ++p; @@ -99,40 +99,40 @@ static void mlCharacters(void* userData, const xmlChar* ch, int len) } static xmlSAXHandler mySAXHandler = -{ - 0, // internalSubsetSAXFunc - 0, // isStandaloneSAXFunc - 0, // hasInternalSubsetSAXFunc - 0, // hasExternalSubsetSAXFunc - 0, // resolveEntitySAXFunc - 0, // getEntitySAXFunc - 0, // entityDeclSAXFunc - 0, // notationDeclSAXFunc - 0, // attributeDeclSAXFunc - 0, // elementDeclSAXFunc - 0, // unparsedEntityDeclSAXFunc - 0, // setDocumentLocatorSAXFunc - 0, // startDocumentSAXFunc - 0, // endDocumentSAXFunc - &mlStartElement, // startElementSAXFunc - &mlEndElement, // endElementSAXFunc - 0, // referenceSAXFunc - &mlCharacters, // charactersSAXFunc - 0, // ignorableWhitespaceSAXFunc - 0, // processingInstructionSAXFunc - 0, // commentSAXFunc - 0, // warningSAXFunc - 0, // errorSAXFunc - 0, // fatalErrorSAXFunc - 0, // getParameterEntitySAXFunc - 0, // cdataBlockSAXFunc - 0, // externalSubsetSAXFunc - 0, // unsigned int initialized - 0, // void * _private - 0, // startElementNsSAX2Func - 0, // endElementNsSAX2Func - 0, // xmlStructuredErrorFunc -}; + { + 0, // internalSubsetSAXFunc + 0, // isStandaloneSAXFunc + 0, // hasInternalSubsetSAXFunc + 0, // hasExternalSubsetSAXFunc + 0, // resolveEntitySAXFunc + 0, // getEntitySAXFunc + 0, // entityDeclSAXFunc + 0, // notationDeclSAXFunc + 0, // attributeDeclSAXFunc + 0, // elementDeclSAXFunc + 0, // unparsedEntityDeclSAXFunc + 0, // setDocumentLocatorSAXFunc + 0, // startDocumentSAXFunc + 0, // endDocumentSAXFunc + &mlStartElement, // startElementSAXFunc + &mlEndElement, // endElementSAXFunc + 0, // referenceSAXFunc + &mlCharacters, // charactersSAXFunc + 0, // ignorableWhitespaceSAXFunc + 0, // processingInstructionSAXFunc + 0, // commentSAXFunc + 0, // warningSAXFunc + 0, // errorSAXFunc + 0, // fatalErrorSAXFunc + 0, // getParameterEntitySAXFunc + 0, // cdataBlockSAXFunc + 0, // externalSubsetSAXFunc + 0, // unsigned int initialized + 0, // void * _private + 0, // startElementNsSAX2Func + 0, // endElementNsSAX2Func + 0, // xmlStructuredErrorFunc + }; XmlRpcRequest XmlRpcRequestProcessor::parseMemory(const std::string& xml) @@ -141,7 +141,7 @@ XmlRpcRequestProcessor::parseMemory(const std::string& xml) SharedHandle<SessionData> sessionData(new SessionData(_stm.get())); int r = xmlSAXUserParseMemory(&mySAXHandler, sessionData.get(), - xml.data(), xml.size()); + xml.data(), xml.size()); if(r != 0) { throw DL_ABORT_EX(MSG_CANNOT_PARSE_XML_RPC_REQUEST); } |
