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/07/15 02:14:15 UTC

[trafficserver] 02/02: Add debug prints

This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 97737e6b183ad1f97abdb3e7adb2766c31dbad1d
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Sun Jul 15 11:13:42 2018 +0900

    Add debug prints
---
 iocore/net/quic/QUICPacket.cc      | 6 +++---
 iocore/net/quic/QUICTLS_openssl.cc | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/iocore/net/quic/QUICPacket.cc b/iocore/net/quic/QUICPacket.cc
index fd9a1db..cffe2c9 100644
--- a/iocore/net/quic/QUICPacket.cc
+++ b/iocore/net/quic/QUICPacket.cc
@@ -851,17 +851,17 @@ QUICPacket::unprotect_packet_number(uint8_t *packet, size_t packet_len, const QU
       break;
     }
     if (!QUICPacketLongHeader::packet_number_offset(pn_offset, packet, packet_len)) {
-      Debug("quic", "Failed to calculate packet number offset");
+      Debug(tag.data(), "Failed to calculate packet number offset");
       return false;
     }
 
-    Debug("quic", "Unprotecting a packet number of %s packet using %s", QUICDebugNames::packet_type(type),
+    Debug(tag.data(), "Unprotecting a packet number of %s packet using %s", QUICDebugNames::packet_type(type),
           QUICDebugNames::key_phase(phase));
 
   } else {
     QUICPacketShortHeader::key_phase(phase, packet, packet_len);
     if (!QUICPacketShortHeader::packet_number_offset(pn_offset, packet, packet_len, QUICConfigParams::scid_len())) {
-      Debug("quic", "Failed to calculate packet number offset");
+      Debug(tag.data(), "Failed to calculate packet number offset");
       return false;
     }
   }
diff --git a/iocore/net/quic/QUICTLS_openssl.cc b/iocore/net/quic/QUICTLS_openssl.cc
index a1030b0..f616a9f 100644
--- a/iocore/net/quic/QUICTLS_openssl.cc
+++ b/iocore/net/quic/QUICTLS_openssl.cc
@@ -216,7 +216,7 @@ QUICTLS::_decrypt(uint8_t *plain, size_t &plain_len, size_t max_plain_len, const
     plain_len += len;
     return true;
   } else {
-    Debug(tag, "Failed to decrypt");
+    Debug(tag, "Failed to decrypt -- the first 4 bytes decrypted are %0x %0x %0x %0x", plain[0], plain[1], plain[2], plain[3]);
     return false;
   }
 }