X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffilter_multi.cpp;h=8ddc5a8ce605f01ee921519d4aef83dbc00bb27c;hb=a33667e77c497b4b3f869fdf5d0fb97896363780;hp=f728724489e8302ccba168f9f15cc5f1bb51ca80;hpb=e8f88ae9eb36023af537c24847744f57e6bf6c4e;p=metaproxy-moved-to-github.git diff --git a/src/filter_multi.cpp b/src/filter_multi.cpp index f728724..8ddc5a8 100644 --- a/src/filter_multi.cpp +++ b/src/filter_multi.cpp @@ -1,5 +1,5 @@ /* This file is part of Metaproxy. - Copyright (C) 2005-2009 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 @@ -20,15 +20,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "config.hpp" -#include "filter.hpp" -#include "package.hpp" +#include +#include #include #include #include #include -#include "util.hpp" +#include #include "filter_multi.hpp" #include @@ -766,6 +766,14 @@ void yf::Multi::Frontend::present(mp::Package &package, Z_APDU *apdu_req) f_resp->records = z_records_diag; *f_resp->presentStatus = Z_PresentStatus_failure; } + else if (number < 0 || number > jobs.size()) + { + f_apdu = + odr.create_presentResponse( + apdu_req, + YAZ_BIB1_PRESENT_REQUEST_OUT_OF_RANGE, + 0); + } else { f_resp->records = (Z_Records *) odr_malloc(odr, sizeof(Z_Records));