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
Fix tcpip_rcvconnect for gnutls comstack
[yaz-moved-to-github.git]
/
src
/
zoom-sru.c
diff --git
a/src/zoom-sru.c
b/src/zoom-sru.c
index
87de7c3
..
687ca83
100644
(file)
--- a/
src/zoom-sru.c
+++ b/
src/zoom-sru.c
@@
-313,7
+313,7
@@
static zoom_ret handle_srw_response(ZOOM_connection c,
}
for (i = 0; i<res->num_records; i++)
{
}
for (i = 0; i<res->num_records; i++)
{
- int pos;
+ int pos = *start + i;
Z_SRW_record *sru_rec;
Z_SRW_diagnostic *diag = 0;
int num_diag;
Z_SRW_record *sru_rec;
Z_SRW_diagnostic *diag = 0;
int num_diag;
@@
-321,12
+321,10
@@
static zoom_ret handle_srw_response(ZOOM_connection c,
Z_NamePlusRecord *npr = (Z_NamePlusRecord *)
odr_malloc(c->odr_in, sizeof(Z_NamePlusRecord));
Z_NamePlusRecord *npr = (Z_NamePlusRecord *)
odr_malloc(c->odr_in, sizeof(Z_NamePlusRecord));
- /* recordPosition is 1 based */
+ /* only trust recordPosition if >= calculated position */
if (res->records[i].recordPosition &&
if (res->records[i].recordPosition &&
- *res->records[i].recordPosition > 0)
+ *res->records[i].recordPosition >= pos + 1)
pos = *res->records[i].recordPosition - 1;
pos = *res->records[i].recordPosition - 1;
- else
- pos = *start + i;
sru_rec = &res->records[i];
sru_rec = &res->records[i];