X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fyaz-z-server-sr.cpp;h=08f1a39d6df0511bf7871be2c61769c15beaef07;hb=bed85d2160500f57db63f4ab9d5533e0225cce15;hp=f77e749718b17f1e70e467d1c46d4df0ac279d8c;hpb=b8e64d193b1b4f3197cb0c1db2f8d097e67cd50a;p=yazpp-moved-to-github.git diff --git a/src/yaz-z-server-sr.cpp b/src/yaz-z-server-sr.cpp index f77e749..08f1a39 100644 --- a/src/yaz-z-server-sr.cpp +++ b/src/yaz-z-server-sr.cpp @@ -1,8 +1,11 @@ /* This file is part of the yazpp toolkit. - * Copyright (C) 1998-2009 Index Data and Mike Taylor + * Copyright (C) 1998-2012 Index Data and Mike Taylor * See the file LICENSE for details. */ +#if HAVE_CONFIG_H +#include +#endif #include #include @@ -27,7 +30,7 @@ Z_Records *Yaz_Facility_Retrieval::pack_records (Z_Server *s, 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++) @@ -44,7 +47,7 @@ Z_Records *Yaz_Facility_Retrieval::pack_records (Z_Server *s, if (records->which != Z_Records_DBOSD) { - *pres = Z_PRES_FAILURE; + *pres = Z_PresentStatus_failure; return records; } @@ -65,7 +68,7 @@ Z_Records *Yaz_Facility_Retrieval::pack_records (Z_Server *s, /* 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) @@ -138,7 +141,7 @@ void Yaz_Facility_Retrieval::fetch_via_piggyback (Z_Server *s, { res->presentStatus = (Odr_int *) odr_malloc (odr_encode(), sizeof(Odr_int)); - *res->presentStatus = Z_PRES_SUCCESS; + *res->presentStatus = Z_PresentStatus_success; res->records = pack_records(s, req->resultSetName, 1, toget, compp, res->nextResultSetPosition,