-/* $Id: filter_virt_db.cpp,v 1.26 2006-01-16 15:51:56 adam Exp $
+/* $Id: filter_virt_db.cpp,v 1.27 2006-01-16 16:05:50 adam Exp $
Copyright (c) 2005, Index Data.
%LICENSE%
BackendPtr lookup_backend_from_databases(
std::list<std::string> databases);
BackendPtr create_backend_from_databases(
- std::list<std::string> databases);
+ std::list<std::string> databases,
+ std::string &failing_database);
BackendPtr init_backend(std::list<std::string> database,
Package &package,
}
yf::Virt_db::BackendPtr yf::Virt_db::Frontend::create_backend_from_databases(
- std::list<std::string> databases)
+ std::list<std::string> databases, std::string &failing_database)
{
BackendPtr b(new Backend);
std::list<std::string>::const_iterator db_it = databases.begin();
map_it = m_p->m_maps.find(*db_it);
if (map_it == m_p->m_maps.end()) // database not found
{
+ failing_database = *db_it;
BackendPtr ptr;
return ptr;
}
std::list<std::string> databases, Package &package,
int &error_code, std::string &addinfo)
{
- BackendPtr b = create_backend_from_databases(databases);
+ std::string failing_database;
+ BackendPtr b = create_backend_from_databases(databases, failing_database);
if (!b)
{
error_code = YAZ_BIB1_DATABASE_UNAVAILABLE;
- // addinfo = database;
+ addinfo = failing_database;
return b;
}
Package init_package(b->m_backend_session, package.origin());