projects
/
metaproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rpn_cql: allow conversion from RPN to CQL MP-537
[metaproxy-moved-to-github.git]
/
src
/
filter_virt_db.cpp
diff --git
a/src/filter_virt_db.cpp
b/src/filter_virt_db.cpp
index
896ae47
..
6849917
100644
(file)
--- a/
src/filter_virt_db.cpp
+++ b/
src/filter_virt_db.cpp
@@
-1,5
+1,5
@@
/* This file is part of Metaproxy.
/* 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
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 <yaz/diagbib1.h>
#include <yaz/match_glob.h>
#include <yaz/log.h>
#include <yaz/diagbib1.h>
#include <yaz/match_glob.h>
#include <yaz/log.h>
+#include <yaz/oid_db.h>
#include <map>
#include <iostream>
#include <map>
#include <iostream>
@@
-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;
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;
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();
{
package.response() = present_package.response();
package.session().close();
- return;
}
else
{
}
else
{