From: Adam Dickmeiss Date: Mon, 19 Dec 2011 11:33:49 +0000 (+0100) Subject: zoom: honor database argument nocproxy X-Git-Tag: v1.3.20~4 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=abfa858112f06cbe6d53caaa3c9f7393110df092;p=metaproxy-moved-to-github.git zoom: honor database argument nocproxy This disables creating a content connector session (for non-CF targets, usually) and also relays nocproxy as database argument to a CF target. --- diff --git a/src/filter_zoom.cpp b/src/filter_zoom.cpp index 45ead65..5c1616b 100644 --- a/src/filter_zoom.cpp +++ b/src/filter_zoom.cpp @@ -738,6 +738,7 @@ yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases( const char *param_password = 0; const char *param_content_user = 0; const char *param_content_password = 0; + const char *param_nocproxy = 0; int no_parms = 0; char **names; @@ -771,6 +772,8 @@ yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases( param_content_password = value; else if (!strcmp(name, "content-proxy")) content_proxy = value; + else if (!strcmp(name, "nocproxy")) + param_nocproxy = value; else if (!strcmp(name, "proxy")) { char **dstr; @@ -1001,6 +1004,11 @@ yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases( out_names[no_out_args] = "subdatabase"; out_values[no_out_args++] = odr_strdup(odr, sptr->cfSubDB.c_str()); } + if (param_nocproxy) + { + out_names[no_out_args] = "nocproxy"; + out_values[no_out_args++] = odr_strdup(odr, param_nocproxy); + } } else { @@ -1044,7 +1052,7 @@ yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases( } package.log("zoom", YLOG_LOG, "url: %s", url.c_str()); b->connect(url, error, addinfo, odr); - if (*error == 0) + if (*error == 0 && !param_nocproxy) create_content_session(package, b, error, addinfo, odr, content_authentication.length() ? content_authentication : authentication,