X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Ftest_filter_multi.cpp;h=e0a6f50b19052982d3ca78c1b1119b6510f6c16e;hb=60d4816be16dc740e99f01ca4c6f2e086b6b5a78;hp=e9dbe85c81e153424d30f7b2f44f453712b3b9a2;hpb=665559cbc22546e8df69be33a7d492294cab9fb1;p=metaproxy-moved-to-github.git diff --git a/src/test_filter_multi.cpp b/src/test_filter_multi.cpp index e9dbe85..e0a6f50 100644 --- a/src/test_filter_multi.cpp +++ b/src/test_filter_multi.cpp @@ -1,5 +1,5 @@ /* This file is part of Metaproxy. - Copyright (C) 2005-2008 Index Data + Copyright (C) 2005-2010 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 @@ -21,10 +21,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include "filter_multi.hpp" -#include "util.hpp" +#include #include "router_chain.hpp" -#include "session.hpp" -#include "package.hpp" +#include #define BOOST_AUTO_TEST_MAIN #define BOOST_TEST_DYN_LINK @@ -43,14 +42,11 @@ public: } Z_GDU *gdu = package.request().get(); - if (gdu) + if (gdu && gdu->which == Z_GDU_Z3950) { // std::cout << "Got PDU. Sending init response\n"; mp::odr odr; - Z_APDU *apdu = zget_APDU(odr, Z_APDU_initResponse); - - apdu->u.initResponse->implementationName = "YP2/YAZ"; - + Z_APDU *apdu = odr.create_initResponse(gdu->u.z3950, 0, 0); package.response() = apdu; } package.move();