From: Adam Dickmeiss Date: Fri, 28 Sep 2012 14:03:11 +0000 (+0200) Subject: Log at least first non surrogate diagnostic X-Git-Tag: v1.3.47~13 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=eb212c18f54ec854e1de8a759aa3b65ed69aeae8;p=metaproxy-moved-to-github.git Log at least first non surrogate diagnostic Instead of "Z_Records_multipleNSD" --- diff --git a/src/gduutil.cpp b/src/gduutil.cpp index 8fe1ac4..61d9f92 100644 --- a/src/gduutil.cpp +++ b/src/gduutil.cpp @@ -80,8 +80,7 @@ std::ostream& std::operator<<(std::ostream& os, Z_Records & rs) os << *(rs.u.nonSurrogateDiagnostic); break; case Z_Records_multipleNSD: - os << "Z_Records_multipleNSD"; - //os << *(rs.u.multipleNonSurDiagnostics); + os << *(rs.u.multipleNonSurDiagnostics); break; default: os << "Z_Records" ; @@ -90,6 +89,20 @@ std::ostream& std::operator<<(std::ostream& os, Z_Records & rs) return os; } +std::ostream& std::operator<<(std::ostream& os, Z_DiagRecs& dr) +{ + if (dr.num_diagRecs >= 1) + { + os << *dr.diagRecs[0]; + } + else + { + os << "multipleNSD"; + } + return os; +} + + std::ostream& std::operator<<(std::ostream& os, Z_DiagRec& dr) { switch (dr.which) diff --git a/src/gduutil.hpp b/src/gduutil.hpp index 89a4503..5530740 100644 --- a/src/gduutil.hpp +++ b/src/gduutil.hpp @@ -33,6 +33,7 @@ namespace std std::ostream& operator<<(std::ostream& os, Z_HTTP_Response& httpres); std::ostream& operator<<(std::ostream& os, Z_Records & rs); std::ostream& operator<<(std::ostream& os, Z_DiagRec& dr); + std::ostream& operator<<(std::ostream& os, Z_DiagRecs& dr); std::ostream& operator<<(std::ostream& os, Z_DefaultDiagFormat& ddf); }