X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Ffilter_bounce.cpp;h=4296b1accfd28ceaac0f1fe3b72f2c7e7bc95e1a;hb=73f37c91c144b070020df2f27472c09b62367acf;hp=25c1e1e84926cdb90cd538b1391368ac0b7d143b;hpb=c19c258db7edf27757252656c67a1a93064e676b;p=metaproxy-moved-to-github.git diff --git a/src/filter_bounce.cpp b/src/filter_bounce.cpp index 25c1e1e..4296b1a 100644 --- a/src/filter_bounce.cpp +++ b/src/filter_bounce.cpp @@ -1,5 +1,5 @@ /* This file is part of Metaproxy. - Copyright (C) 2005-2011 Index Data + Copyright (C) 2005-2012 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 @@ -25,6 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include +namespace mp = metaproxy_1; namespace yf = mp::filter; namespace metaproxy_1 { @@ -53,18 +54,18 @@ void yf::Bounce::process(mp::Package &package) const return; } package.session().close(); - + Z_GDU *zgdu = package.request().get(); - + if (!zgdu) return; - + //std::string message("BOUNCE "); - std::ostringstream message; + std::ostringstream message; message << "BOUNCE " << *zgdu; - - metaproxy_1::odr odr; - + + metaproxy_1::odr odr; + if (zgdu->which == Z_GDU_Z3950) { Z_APDU *apdu_res = 0; @@ -76,16 +77,16 @@ void yf::Bounce::process(mp::Package &package) const else if (zgdu->which == Z_GDU_HTTP_Request) { Z_GDU *zgdu_res = 0; - zgdu_res - = odr.create_HTTP_Response(package.session(), + zgdu_res + = odr.create_HTTP_Response(package.session(), zgdu->u.HTTP_Request, 400); - + package.response() = zgdu_res; } else if (zgdu->which == Z_GDU_HTTP_Response) { } - + return; }