projects
/
metaproxy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
235ec6e
)
Extend presentResponse logging with proper status
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 21 Apr 2010 12:00:45 +0000
(14:00 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 21 Apr 2010 12:00:45 +0000
(14:00 +0200)
src/gduutil.cpp
patch
|
blob
|
history
diff --git
a/src/gduutil.cpp
b/src/gduutil.cpp
index
50e5bd0
..
9358976
100644
(file)
--- 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;
{
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);
//<< pr->referenceId << " "
if (pr->numberOfRecordsReturned)
os << " " << *(pr->numberOfRecordsReturned);