X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;ds=sidebyside;f=src%2Ffilter_frontend_net.cpp;h=71fb5d1fa6c0343bd5b6d3df6d52549273af8356;hb=11dbf51bcfc1565ad3a58f8ecf6b8abc8bfd848a;hp=38c6306a1583a306855b12d67d78975aac26ad4e;hpb=5fb15c1c6a830a71b60c6bed258c17000bf94e85;p=metaproxy-moved-to-github.git diff --git a/src/filter_frontend_net.cpp b/src/filter_frontend_net.cpp index 38c6306..71fb5d1 100644 --- a/src/filter_frontend_net.cpp +++ b/src/filter_frontend_net.cpp @@ -1,4 +1,4 @@ -/* $Id: filter_frontend_net.cpp,v 1.12 2006-01-09 13:43:59 adam Exp $ +/* $Id: filter_frontend_net.cpp,v 1.13 2006-01-09 18:18:07 adam Exp $ Copyright (c) 2005, Index Data. %LICENSE% @@ -288,20 +288,19 @@ void yp2::filter::FrontendNet::configure(const xmlNode * ptr) std::vector ports; for (ptr = ptr->children; ptr; ptr = ptr->next) { - if (ptr->type == XML_ELEMENT_NODE) + if (ptr->type != XML_ELEMENT_NODE) + continue; + if (!strcmp((const char *) ptr->name, "port")) { - if (!strcmp((const char *) ptr->name, "port")) - { - std::string port = yp2::xml::get_text(ptr); - ports.push_back(port); - - } - else - { - throw yp2::filter::FilterException("Bad element " - + std::string((const char *) - ptr->name)); - } + std::string port = yp2::xml::get_text(ptr); + ports.push_back(port); + + } + else + { + throw yp2::filter::FilterException("Bad element " + + std::string((const char *) + ptr->name)); } } m_ports = ports;