/* This file is part of Metaproxy.
- Copyright (C) 2005-2013 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
#include <yaz/diagbib1.h>
#include <yaz/match_glob.h>
#include <yaz/log.h>
+#include <yaz/oid_db.h>
#include <map>
#include <iostream>
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;
{
package.response() = present_package.response();
package.session().close();
- return;
}
else
{