You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2018/08/27 07:10:15 UTC
[trafficserver] 01/03: Cleanup: Suppress nbytes on debug log if it
is INT64_MAX
This is an automated email from the ASF dual-hosted git repository.
masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit ea29ae141cc5891b92f87835cc00f5feaf35a790
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Mon Aug 27 14:59:27 2018 +0900
Cleanup: Suppress nbytes on debug log if it is INT64_MAX
---
iocore/net/quic/QUICApplication.cc | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/iocore/net/quic/QUICApplication.cc b/iocore/net/quic/QUICApplication.cc
index 54bf199..1d77135 100644
--- a/iocore/net/quic/QUICApplication.cc
+++ b/iocore/net/quic/QUICApplication.cc
@@ -62,8 +62,13 @@ int64_t
QUICStreamIO::read(uint8_t *buf, int64_t len)
{
if (is_debug_tag_set(tag_stream_io)) {
- QUICStreamIODebug("nbytes=%" PRId64 " ndone=%" PRId64 " read_avail=%" PRId64 " read_len=%" PRId64, this->_read_vio->nbytes,
- this->_read_vio->ndone, this->_read_buffer_reader->read_avail(), len);
+ if (this->_read_vio->nbytes == INT64_MAX) {
+ QUICStreamIODebug("nbytes=-" PRId64 " ndone=%" PRId64 " read_avail=%" PRId64 " read_len=%" PRId64, this->_read_vio->ndone,
+ this->_read_buffer_reader->read_avail(), len);
+ } else {
+ QUICStreamIODebug("nbytes=%" PRId64 " ndone=%" PRId64 " read_avail=%" PRId64 " read_len=%" PRId64, this->_read_vio->nbytes,
+ this->_read_vio->ndone, this->_read_buffer_reader->read_avail(), len);
+ }
}
int64_t nread = this->_read_buffer_reader->read(buf, len);
@@ -114,8 +119,13 @@ QUICStreamIO::write(IOBufferReader *r, int64_t len)
if (bytes_avail > 0) {
if (is_debug_tag_set(tag_stream_io)) {
- QUICStreamIODebug("nbytes=%" PRId64 " ndone=%" PRId64 " write_avail=%" PRId64 " write_len=%" PRId64, this->_write_vio->nbytes,
- this->_write_vio->ndone, bytes_avail, len);
+ if (this->_write_vio->nbytes == INT64_MAX) {
+ QUICStreamIODebug("nbytes=- ndone=%" PRId64 " write_avail=%" PRId64 " write_len=%" PRId64, this->_write_vio->ndone,
+ bytes_avail, len);
+ } else {
+ QUICStreamIODebug("nbytes=%" PRId64 " ndone=%" PRId64 " write_avail=%" PRId64 " write_len=%" PRId64,
+ this->_write_vio->nbytes, this->_write_vio->ndone, bytes_avail, len);
+ }
}
int64_t bytes_len = std::min(bytes_avail, len);