From 3d0553a2f54590b6d44cce898204dd1c369ea84e Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Fri, 3 Nov 2006 23:14:40 +0000 Subject: [PATCH] Fixed logging of time_t for portability. --- saml/binding/impl/MessageFlowRule.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/saml/binding/impl/MessageFlowRule.cpp b/saml/binding/impl/MessageFlowRule.cpp index ef70bd0..001f84e 100644 --- a/saml/binding/impl/MessageFlowRule.cpp +++ b/saml/binding/impl/MessageFlowRule.cpp @@ -83,11 +83,13 @@ void MessageFlowRule::check(const XMLCh* id, time_t issueInstant) const time_t skew = XMLToolingConfig::getConfig().clock_skew_secs; time_t now = time(NULL); if (issueInstant > now + skew) { - log.error("rejected not-yet-valid message, timestamp (%lu), now (%lu)", issueInstant, now + skew); + log.errorStream() << "rejected not-yet-valid message, timestamp (" << issueInstant << + "), newest allowed (" << now + skew << ")" << CategoryStream::ENDLINE; throw BindingException("Message rejected, was issued in the future."); } else if (issueInstant < now - skew - m_expires) { - log.error("rejected expired message, timestamp (%lu), oldest allowed (%lu)", issueInstant, now - skew - m_expires); + log.errorStream() << "rejected expired message, timestamp (" << issueInstant << + "), oldest allowed (" << (now - skew - m_expires) << ")" << CategoryStream::ENDLINE; throw BindingException("Message expired, was issued too long ago."); } -- 2.1.4