boost::mutex m_mutex;
boost::condition m_cond_session_ready;
std::map<mp::Session, FrontendPtr> m_clients;
+ bool pass_vhosts;
};
}
}
yf::VirtualDB::VirtualDB() : m_p(new VirtualDB::Rep)
{
+ m_p->pass_vhosts = false;
}
yf::VirtualDB::~VirtualDB() {
std::list<std::string> vhosts;
mp::util::get_vhost_otherinfo(req->otherInfo, vhosts);
- if (vhosts.size() == 0)
+
+ if (vhosts.size() > 0 && m_p->pass_vhosts)
+ {
+ package.move();
+ }
+ else
{
f->m_init_gdu = gdu;
package.response() = apdu;
f->m_is_virtual = true;
}
- else
- package.move();
}
else if (!f->m_is_virtual)
package.move();
{
if (ptr->type != XML_ELEMENT_NODE)
continue;
- if (!strcmp((const char *) ptr->name, "virtual"))
+ if (!strcmp((const char *) ptr->name, "pass-vhosts"))
+ {
+ m_p->pass_vhosts = mp::xml::get_bool(ptr->children, false);
+ }
+ else if (!strcmp((const char *) ptr->name, "virtual"))
{
std::string database;
std::list<std::string> targets;
attribute type { "virt_db" },
attribute id { xsd:NCName }?,
attribute name { xsd:NCName }?,
+ element mp:pass-vhosts { xsd:boolean }?,
element mp:virtual {
attribute route { xsd:NCName }?,
element mp:database { xsd:NCName },
</xs:attributeGroup>
<xs:group name="filter_virt_db">
<xs:sequence>
+ <xs:element minOccurs="0" ref="mp:pass-vhosts"/>
<xs:element maxOccurs="unbounded" ref="mp:virtual"/>
</xs:sequence>
</xs:group>
+ <xs:element name="pass-vhosts" type="xs:boolean"/>
<xs:element name="virtual">
<xs:complexType>
<xs:sequence>