Better logging of empty response data.
authorScott Cantor <cantor.2@osu.edu>
Mon, 30 May 2005 01:55:36 +0000 (01:55 +0000)
committerScott Cantor <cantor.2@osu.edu>
Mon, 30 May 2005 01:55:36 +0000 (01:55 +0000)
shib-target/RPCListener.cpp

index be6f811..d0895a7 100644 (file)
@@ -270,21 +270,21 @@ EntryWrapper::EntryWrapper(shibrpc_get_session_ret_2& ret, Category& log)
 
     istringstream authstream(ret.auth_statement);
     log.debugStream() << "trying to decode authentication statement: "
-        << ret.auth_statement << CategoryStream::ENDLINE;
+        << ((ret.auth_statement && *ret.auth_statement) ? ret.auth_statement : "(none)") << CategoryStream::ENDLINE;
     auto_ptr<SAMLAuthenticationStatement> s(
        (ret.auth_statement && *ret.auth_statement) ? new SAMLAuthenticationStatement(authstream) : NULL
        );
 
     istringstream prestream(ret.attr_response_pre);
     log.debugStream() << "trying to decode unfiltered attribute response: "
-        << ret.attr_response_pre << CategoryStream::ENDLINE;
+        << ((ret.attr_response_pre && *ret.attr_response_pre) ? ret.attr_response_pre : "(none)") << CategoryStream::ENDLINE;
     auto_ptr<SAMLResponse> pre(
        (ret.attr_response_pre && *ret.attr_response_pre) ? new SAMLResponse(prestream,minor) : NULL
        );
 
     istringstream poststream(ret.attr_response_post);
     log.debugStream() << "trying to decode filtered attribute response: "
-        << ret.attr_response_post << CategoryStream::ENDLINE;
+        << ((ret.attr_response_post && *ret.attr_response_post) ? ret.attr_response_post : "(none)") << CategoryStream::ENDLINE;
     auto_ptr<SAMLResponse> post(
        (ret.attr_response_post && *ret.attr_response_post) ? new SAMLResponse(poststream,minor) : NULL
        );