projects
/
yazpp-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump version to 1.2.1. Depend on YAZ 4.0.1
[yazpp-moved-to-github.git]
/
src
/
yaz-z-server-sr.cpp
diff --git
a/src/yaz-z-server-sr.cpp
b/src/yaz-z-server-sr.cpp
index
1715810
..
bb13677
100644
(file)
--- a/
src/yaz-z-server-sr.cpp
+++ b/
src/yaz-z-server-sr.cpp
@@
-1,5
+1,5
@@
/* This file is part of the yazpp toolkit.
/* This file is part of the yazpp toolkit.
- * Copyright (C) 1998-2008 Index Data and Mike Taylor
+ * Copyright (C) 1998-2010 Index Data and Mike Taylor
* See the file LICENSE for details.
*/
* See the file LICENSE for details.
*/
@@
-12,7
+12,7
@@
Z_Records *Yaz_Facility_Retrieval::pack_records (Z_Server *s,
const char *resultSetName,
int start, int xnum,
Z_RecordComposition *comp,
const char *resultSetName,
int start, int xnum,
Z_RecordComposition *comp,
- int *next, int *pres,
+ Odr_int *next, Odr_int *pres,
Odr_oid *format)
{
int recno, total_length = 0, toget = xnum, dumped_records = 0;
Odr_oid *format)
{
int recno, total_length = 0, toget = xnum, dumped_records = 0;
@@
-27,7
+27,7
@@
Z_Records *Yaz_Facility_Retrieval::pack_records (Z_Server *s,
records->u.databaseOrSurDiagnostics = reclist;
reclist->num_records = 0;
reclist->records = list;
records->u.databaseOrSurDiagnostics = reclist;
reclist->num_records = 0;
reclist->records = list;
- *pres = Z_PRES_SUCCESS;
+ *pres = Z_PresentStatus_success;
*next = 0;
for (recno = start; reclist->num_records < toget; recno++)
*next = 0;
for (recno = start; reclist->num_records < toget; recno++)
@@
-44,7
+44,7
@@
Z_Records *Yaz_Facility_Retrieval::pack_records (Z_Server *s,
if (records->which != Z_Records_DBOSD)
{
if (records->which != Z_Records_DBOSD)
{
- *pres = Z_PRES_FAILURE;
+ *pres = Z_PresentStatus_failure;
return records;
}
return records;
}
@@
-65,7
+65,7
@@
Z_Records *Yaz_Facility_Retrieval::pack_records (Z_Server *s,
/* record is small enough, really */
if (this_length <= m_preferredMessageSize)
{
/* record is small enough, really */
if (this_length <= m_preferredMessageSize)
{
- *pres = Z_PRES_PARTIAL_2;
+ *pres = Z_PresentStatus_partial_2;
break;
}
if (this_length >= m_maximumRecordSize)
break;
}
if (this_length >= m_maximumRecordSize)
@@
-114,7
+114,7
@@
void Yaz_Facility_Retrieval::fetch_via_piggyback (Z_Server *s,
Z_RecordComposition comp, *compp = 0;
int hits = *res->resultCount;
Z_RecordComposition comp, *compp = 0;
int hits = *res->resultCount;
- int *nulint = (int *)odr_malloc (odr_encode(), sizeof(*nulint));
+ Odr_int *nulint = (Odr_int *)odr_malloc (odr_encode(), sizeof(*nulint));
*nulint = 0;
comp.which = Z_RecordComp_simple;
*nulint = 0;
comp.which = Z_RecordComp_simple;
@@
-136,8
+136,9
@@
void Yaz_Facility_Retrieval::fetch_via_piggyback (Z_Server *s,
if (toget && !res->records)
{
if (toget && !res->records)
{
- res->presentStatus = (int *) odr_malloc (odr_encode(), sizeof(int));
- *res->presentStatus = Z_PRES_SUCCESS;
+ res->presentStatus = (Odr_int *)
+ odr_malloc (odr_encode(), sizeof(Odr_int));
+ *res->presentStatus = Z_PresentStatus_success;
res->records =
pack_records(s, req->resultSetName, 1, toget, compp,
res->nextResultSetPosition,
res->records =
pack_records(s, req->resultSetName, 1, toget, compp,
res->nextResultSetPosition,
@@
-238,6
+239,7
@@
int Yaz_Facility_Retrieval::recv(Z_Server *s, Z_APDU *apdu_request)
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab