From: Adam Dickmeiss Date: Wed, 7 Dec 2011 11:30:22 +0000 (+0100) Subject: zoom: db arg content-{user,password} dealt with X-Git-Tag: v1.3.18~7 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=1e20397384366cc4a16ce8550e7a39c045cde615;p=metaproxy-moved-to-github.git zoom: db arg content-{user,password} dealt with --- diff --git a/src/filter_zoom.cpp b/src/filter_zoom.cpp index 99ed354..05f3a4c 100644 --- a/src/filter_zoom.cpp +++ b/src/filter_zoom.cpp @@ -723,11 +723,14 @@ yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases( torus_db = database; std::string authentication; + std::string content_authentication; std::string proxy; std::string realm = m_p->default_realm; const char *param_user = 0; const char *param_password = 0; + const char *param_content_user = 0; + const char *param_content_password = 0; int no_parms = 0; char **names; @@ -753,6 +756,10 @@ yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases( param_user = value; else if (!strcmp(name, "password")) param_password = value; + else if (!strcmp(name, "content-user")) + param_content_user = value; + else if (!strcmp(name, "content-password")) + param_content_password = value; else if (!strcmp(name, "proxy")) proxy = value; else if (!strcmp(name, "cproxysession")) @@ -783,6 +790,12 @@ yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases( if (param_password) authentication += "/" + std::string(param_password); } + if (param_content_user) + { + content_authentication = std::string(param_content_user); + if (param_content_password) + content_authentication += "/" + std::string(param_content_password); + } SearchablePtr sptr; std::map::iterator it; @@ -1004,7 +1017,8 @@ yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases( b->connect(url, error, addinfo, odr); if (*error == 0) create_content_session(package, b, error, addinfo, odr, - authentication, proxy); + content_authentication.length() ? + content_authentication : authentication, proxy); if (*error == 0) m_backend = b; return b;