From 0a7f68cbd61a5cd143834ee3c62da6256c8e9648 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 16 Jun 2011 13:04:44 +0200 Subject: [PATCH] Use base db for Torus lookup - up to comma - if given --- src/filter_zoom.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/filter_zoom.cpp b/src/filter_zoom.cpp index f8d4f34..5860e15 100644 --- a/src/filter_zoom.cpp +++ b/src/filter_zoom.cpp @@ -773,7 +773,14 @@ void yf::Zoom::Frontend::handle_search(mp::Package &package) int error = 0; const char *addinfo = 0; std::string db(sr->databaseNames[0]); - BackendPtr b = get_backend_from_databases(db, &error, &addinfo); + std::string torus_db; + size_t db_arg_pos = db.find(','); + if (db_arg_pos != std::string::npos) + torus_db = db.substr(0, db_arg_pos); + else + torus_db = db; + + BackendPtr b = get_backend_from_databases(torus_db, &error, &addinfo); if (error) { apdu_res = -- 1.7.10.4