Removed unused code in filter_multi
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 15 May 2006 13:22:02 +0000 (13:22 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 15 May 2006 13:22:02 +0000 (13:22 +0000)
src/filter_multi.cpp
src/filter_virt_db.cpp

index a8d4725..fcf3f5b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: filter_multi.cpp,v 1.16 2006-05-15 11:40:26 adam Exp $
+/* $Id: filter_multi.cpp,v 1.17 2006-05-15 13:22:02 adam Exp $
    Copyright (c) 2005-2006, Index Data.
 
 %LICENSE%
@@ -98,7 +98,6 @@ namespace metaproxy_1 {
             FrontendPtr get_frontend(Package &package);
             void release_frontend(Package &package);
         private:
-            std::map<std::string, Multi::Map>m_maps;
             std::map<std::string,std::string> m_target_route;
             boost::mutex m_mutex;
             boost::condition m_cond_session_ready;
@@ -200,13 +199,6 @@ yf::Multi::~Multi() {
 }
 
 
-void yf::Multi::add_map_host2hosts(std::string host,
-                                   std::list<std::string> hosts,
-                                   std::string route)
-{
-    m_p->m_maps[host] = Multi::Map(hosts, route);
-}
-
 void yf::Multi::Backend::operator() (void) 
 {
     m_package->move(m_route);
@@ -1095,36 +1087,6 @@ void mp::filter::Multi::configure(const xmlNode * ptr)
             std::cout << "route=" << route << " target=" << target << "\n";
             m_p->m_target_route[target] = route;
         }
-        else if (!strcmp((const char *) ptr->name, "virtual"))
-        {
-            std::list<std::string> targets;
-            std::string vhost;
-            xmlNode *v_node = ptr->children;
-            for (; v_node; v_node = v_node->next)
-            {
-                if (v_node->type != XML_ELEMENT_NODE)
-                    continue;
-                
-                if (mp::xml::is_element_yp2(v_node, "vhost"))
-                    vhost = mp::xml::get_text(v_node);
-                else if (mp::xml::is_element_yp2(v_node, "target"))
-                    targets.push_back(mp::xml::get_text(v_node));
-                else
-                    throw mp::filter::FilterException
-                        ("Bad element " 
-                         + std::string((const char *) v_node->name)
-                         + " in virtual section"
-                            );
-            }
-            std::string route = mp::xml::get_route(ptr);
-            add_map_host2hosts(vhost, targets, route);
-            std::list<std::string>::const_iterator it;
-            for (it = targets.begin(); it != targets.end(); it++)
-            {
-                std::cout << "Add " << vhost << "->" << *it
-                          << "," << route << "\n";
-            }
-        }
         else
         {
             throw mp::filter::FilterException
index 69a3ee4..67b6750 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: filter_virt_db.cpp,v 1.38 2006-05-15 11:43:01 adam Exp $
+/* $Id: filter_virt_db.cpp,v 1.39 2006-05-15 13:22:02 adam Exp $
    Copyright (c) 2005-2006, Index Data.
 
 %LICENSE%
@@ -500,7 +500,6 @@ void yf::Virt_db::Frontend::fixup_npr(Package &p, BackendPtr b)
         fixup_npr(gdu->u.z3950->u.searchResponse->records, database, odr);
         p.response() = gdu;
     }
-
 }
 
 void yf::Virt_db::Frontend::present(Package &package, Z_APDU *apdu_req)