[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Plain text patch for CPPServ
- To: uu@total-knowledge.com
- Subject: Plain text patch for CPPServ
- From: "Alexey Parshin" <alexeyp@gmail.com>
- Date: Fri, 31 Aug 2007 20:57:22 +1000
- Delivered-to: mailing list uu@total-knowledge.com
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=VzrOFIBCgTAPcgyJZup/+MG/g4LHCcO5+CDIcTvePb7lqHNnh9i166JjcUPx3Rk0qgSkRFDif+LqTcCQQ3sU7UHQjVuy4H6VAU+cKewtAhB9AlxlumUSz6qiD5yA2vEPtxsiCiOgNZx2ZdQnZyvqtflXjt3fC6vt3St2jUto7Bo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=KmfBWmI0wfQONX+j/dHnBRijCPIa2+9P2i8ZUeahDQ24TFzJFsJwBELoLg+vV+3thSZEIvCKBxf8bFfwEKtOsnL+uheLfz228GS/XaXoxDuOBbJp9rT6I9F5YtDGSKa+pgHRDyKR2qw6gMx06O7+0nc9QlCHH6f0NsYF0YIeJqg=
- Mailing-list: contact uu-help@total-knowledge.com; run by ezmlm
The patch should work for both, 0.1.100 and GIT versions..
--
Alexey Parshin,
http://www.sptk.net
diff -uNr cppserv-0.1.100/src/container/xmlserverconfig.cpp cppserv-0.1.100.new/src/container/xmlserverconfig.cpp
--- cppserv-0.1.100/src/container/xmlserverconfig.cpp 2007-04-06 05:43:29.000000000 +1000
+++ cppserv-0.1.100.new/src/container/xmlserverconfig.cpp 2007-08-28 19:44:02.000000000 +1000
@@ -78,13 +78,22 @@
{
container::XMLServerConfig::XMLConfigNode* cnode =
new container::XMLServerConfig::XMLConfigNode(std::string((*node)->name()),parent);
- //if(n->hasAttributes()) {
+ if ((*node)->hasAttributes()) {
+#ifdef XML_ATTRIBUTE_IS_NODE
+ const CXmlAttributes &attributes = (*node)->attributes();
+ for(CXmlAttributes::const_iterator it=attributes.begin();
+ it!=attributes.end(); it++) {
+ const CXmlNode* attr = *it;
+ cnode->addAttr(attr->name(),attr->value());
+ }
+#else
const CXmlAttributes &attr_map = (*node)->attributes;
for(CXmlAttributes::const_iterator it=attr_map.begin();
it!=attr_map.end(); it++) {
cnode->addAttr(it->first,it->second);
}
- //}
+#endif
+ }
if(!(*node)->empty())
addKids(*node,cnode);
parent->addNode(cnode);//Presumes parent is always set