X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ffilter_virt_db.cpp;h=6849917c79404f74ce107d32a6182cd52056348e;hb=371d2802f2b6c89ac0a603d1ea447b08acd3861a;hp=896ae4779484abd0e63cdb3be7ed543e563d2d3d;hpb=73f37c91c144b070020df2f27472c09b62367acf;p=metaproxy-moved-to-github.git diff --git a/src/filter_virt_db.cpp b/src/filter_virt_db.cpp index 896ae47..6849917 100644 --- a/src/filter_virt_db.cpp +++ b/src/filter_virt_db.cpp @@ -1,5 +1,5 @@ /* This file is part of Metaproxy. - Copyright (C) 2005-2012 Index Data + Copyright (C) Index Data Metaproxy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -32,6 +32,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include #include +#include #include #include @@ -211,6 +212,13 @@ yf::VirtualDB::BackendPtr yf::VirtualDB::Frontend::init_backend( Z_GDU *org_gdu = m_init_gdu.get(); Z_InitRequest *org_init = org_gdu->u.z3950->u.initRequest; + + const char *peer_name = yaz_oi_get_string_oid( + &org_init->otherInfo, yaz_oid_userinfo_client_ip, 1, 0); + if (peer_name) + yaz_oi_set_string_oid(&init_apdu->u.initRequest->otherInfo, odr, + yaz_oid_userinfo_client_ip, 1, peer_name); + req->idAuthentication = org_init->idAuthentication; req->implementationId = org_init->implementationId; req->implementationName = org_init->implementationName; @@ -614,7 +622,6 @@ void yf::VirtualDB::Frontend::present(mp::Package &package, Z_APDU *apdu_req) { package.response() = present_package.response(); package.session().close(); - return; } else {