diff options
author | weidai <weidai11@users.noreply.github.com> | 2003-03-20 20:39:22 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2003-03-20 20:39:22 +0000 |
commit | 067b425053134d8d5d44e1ecb8907ea28b985a68 (patch) | |
tree | d1405622c74eefde7d84f93d429d3c7462e59ce1 | |
parent | 65abe91c8cb91b4b8e1239210b3774ed55b54006 (diff) | |
download | cryptopp-git-067b425053134d8d5d44e1ecb8907ea28b985a68.tar.gz |
fix bug in MeterFilter
-rw-r--r-- | filters.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/filters.cpp b/filters.cpp index ffac5657..64c2a37d 100644 --- a/filters.cpp +++ b/filters.cpp @@ -133,19 +133,23 @@ bool Filter::OutputMessageSeriesEnd(int outputSite, int propagation, bool blocki unsigned int MeterFilter::Put2(const byte *begin, unsigned int length, int messageEnd, bool blocking) { - FILTER_BEGIN; - m_currentMessageBytes += length; - m_totalBytes += length; - - if (messageEnd) + if (m_transparent) { - m_currentMessageBytes = 0; - m_currentSeriesMessages++; - m_totalMessages++; + FILTER_BEGIN; + m_currentMessageBytes += length; + m_totalBytes += length; + + if (messageEnd) + { + m_currentMessageBytes = 0; + m_currentSeriesMessages++; + m_totalMessages++; + } + + FILTER_OUTPUT(1, begin, length, messageEnd); + FILTER_END_NO_MESSAGE_END; } - - FILTER_OUTPUT(1, begin, length, messageEnd); - FILTER_END_NO_MESSAGE_END; + return 0; } bool MeterFilter::IsolatedMessageSeriesEnd(bool blocking) |