projects
/
metaproxy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
05453ec
)
Detect and throw Present Out of Range diagnostic
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 2 Jun 2010 13:50:18 +0000
(15:50 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 2 Jun 2010 13:50:18 +0000
(15:50 +0200)
src/filter_multi.cpp
patch
|
blob
|
history
diff --git
a/src/filter_multi.cpp
b/src/filter_multi.cpp
index
61d001c
..
8ddc5a8
100644
(file)
--- a/
src/filter_multi.cpp
+++ b/
src/filter_multi.cpp
@@
-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;
}
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));
else
{
f_resp->records = (Z_Records *) odr_malloc(odr, sizeof(Z_Records));