X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fgduutil.cpp;h=9358976e82a444b4dd17bf1710fe07690e2ff1c7;hb=7a0b87f3e2efc4263c62d723f4dfd459d324b5c6;hp=6fc6d07b031463aea5dcf152ec175a268551aa8e;hpb=665559cbc22546e8df69be33a7d492294cab9fb1;p=metaproxy-moved-to-github.git diff --git a/src/gduutil.cpp b/src/gduutil.cpp index 6fc6d07..9358976 100644 --- a/src/gduutil.cpp +++ b/src/gduutil.cpp @@ -1,5 +1,5 @@ /* This file is part of Metaproxy. - Copyright (C) 2005-2008 Index Data + Copyright (C) 2005-2010 Index Data Metaproxy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -17,7 +17,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "gduutil.hpp" -#include "util.hpp" +#include #include #include @@ -139,7 +139,7 @@ static void dump_opt_string(std::ostream& os, const char *s) os << "-"; } -static void dump_opt_int(std::ostream& os, const int *i) +static void dump_opt_int(std::ostream& os, const Odr_int *i) { os << " "; if (i) @@ -281,9 +281,24 @@ std::ostream& std::operator<<(std::ostream& os, Z_APDU& zapdu) { Z_PresentResponse *pr = zapdu.u.presentResponse; - if ((pr->presentStatus) && !*(pr->presentStatus)) + if (pr->presentStatus && + *pr->presentStatus != Z_PresentStatus_failure) { - os << "OK"; + switch (*pr->presentStatus) + { + case Z_PresentStatus_success: + os << "OK"; break; + case Z_PresentStatus_partial_1: + os << "Partial-1"; break; + case Z_PresentStatus_partial_2: + os << "Partial-2"; break; + case Z_PresentStatus_partial_3: + os << "Partial-3"; break; + case Z_PresentStatus_partial_4: + os << "Partial-4"; break; + default: + os << "Unknown"; break; + } //<< pr->referenceId << " " if (pr->numberOfRecordsReturned) os << " " << *(pr->numberOfRecordsReturned);