From: Adam Dickmeiss Date: Wed, 21 Apr 2010 12:00:45 +0000 (+0200) Subject: Extend presentResponse logging with proper status X-Git-Tag: v1.1.3~4 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=7a0b87f3e2efc4263c62d723f4dfd459d324b5c6;p=metaproxy-moved-to-github.git Extend presentResponse logging with proper status --- diff --git a/src/gduutil.cpp b/src/gduutil.cpp index 50e5bd0..9358976 100644 --- a/src/gduutil.cpp +++ b/src/gduutil.cpp @@ -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);