projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Indentation
[yaz-moved-to-github.git]
/
server
/
seshigh.c
diff --git
a/server/seshigh.c
b/server/seshigh.c
index
a2a28f9
..
601ff57
100644
(file)
--- a/
server/seshigh.c
+++ b/
server/seshigh.c
@@
-2,7
+2,7
@@
* Copyright (c) 1995-2003, Index Data
* See the file LICENSE for details.
*
* Copyright (c) 1995-2003, Index Data
* See the file LICENSE for details.
*
- * $Id: seshigh.c,v 1.154 2003-04-24 13:30:32 adam Exp $
+ * $Id: seshigh.c,v 1.156 2003-05-20 08:22:33 adam Exp $
*/
/*
*/
/*
@@
-658,20
+658,22
@@
static void srw_bend_search(association *assoc, request *req,
}
else
{
}
else
{
+ int number = srw_req->maximumRecords ? *srw_req->maximumRecords : 0;
+ int start = srw_req->startRecord ? *srw_req->startRecord : 1;
+
+ yaz_log(LOG_LOG, "Request to pack %d+%d out of %d",
+ start, number, rr.hits);
+
srw_res->numberOfRecords = odr_intdup(assoc->encode, rr.hits);
srw_res->numberOfRecords = odr_intdup(assoc->encode, rr.hits);
- if (srw_req->maximumRecords && *srw_req->maximumRecords > 0)
+ if (number > 0)
{
{
- int number = *srw_req->maximumRecords;
- int start = 1;
int i;
int i;
- if (srw_req->startRecord)
- start = *srw_req->startRecord;
-
- yaz_log(LOG_DEBUG, "srw_bend_search. start=%d max=%d",
- start, *srw_req->maximumRecords);
-
- if (start <= rr.hits)
+ if (start > rr.hits)
+ {
+ yaz_log(LOG_LOG, "Request out or range");
+ }
+ else
{
int j = 0;
int packing = Z_SRW_recordPacking_string;
{
int j = 0;
int packing = Z_SRW_recordPacking_string;
@@
-818,18
+820,18
@@
static void process_http_request(association *assoc, request *req)
if (!strcmp(hreq->method, "GET"))
{
if (!strcmp(hreq->method, "GET"))
{
- char *charset = 0;
- int ret = -1;
- Z_SOAP *soap_package = 0;
char *db = "Default";
const char *p0 = hreq->path, *p1;
char *db = "Default";
const char *p0 = hreq->path, *p1;
- static Z_SOAP_Handler soap_handlers[2] = {
#if HAVE_XML2
#if HAVE_XML2
+ int ret = -1;
+ char *charset = 0;
+ Z_SOAP *soap_package = 0;
+ static Z_SOAP_Handler soap_handlers[2] = {
{"http://www.loc.gov/zing/srw/v1.0/", 0,
(Z_SOAP_fun) yaz_srw_codec},
{"http://www.loc.gov/zing/srw/v1.0/", 0,
(Z_SOAP_fun) yaz_srw_codec},
-#endif
{0, 0, 0}
};
{0, 0, 0}
};
+#endif
if (*p0 == '/')
p0++;
if (*p0 == '/')
p0++;