diff options
author | 2021-06-30 07:57:22 +0000 | |
---|---|---|
committer | 2021-07-06 16:16:04 +0000 | |
commit | 08233d44a6cfde878d7e10bca38ae935ed1c8fd5 (patch) | |
tree | 7ecc534d55bdc7e8dd15ecab084720910bcdf4d9 /libtransport/src/io_modules/forwarder/udp_tunnel_listener.cc | |
parent | 147ba39bed26887f5eba84757e2463ab8e370a9a (diff) |
[HICN-713] Transport Library Major Refactoring 2
Co-authored-by: Luca Muscariello <muscariello@ieee.org>
Co-authored-by: Michele Papalini <micpapal@cisco.com>
Co-authored-by: Olivier Roques <oroques+fdio@cisco.com>
Co-authored-by: Giulio Grassi <gigrassi@cisco.com>
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: I5b2c667bad66feb45abdb5effe22ed0f6c85d1c2
Diffstat (limited to 'libtransport/src/io_modules/forwarder/udp_tunnel_listener.cc')
-rw-r--r-- | libtransport/src/io_modules/forwarder/udp_tunnel_listener.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libtransport/src/io_modules/forwarder/udp_tunnel_listener.cc b/libtransport/src/io_modules/forwarder/udp_tunnel_listener.cc index 12246c3cf..d047cc568 100644 --- a/libtransport/src/io_modules/forwarder/udp_tunnel_listener.cc +++ b/libtransport/src/io_modules/forwarder/udp_tunnel_listener.cc @@ -2,8 +2,8 @@ * Copyright (c) 2017-2019 Cisco and/or its affiliates. */ +#include <glog/logging.h> #include <hicn/transport/utils/hash.h> -#include <hicn/transport/utils/log.h> #include <io_modules/forwarder/udp_tunnel.h> #include <io_modules/forwarder/udp_tunnel_listener.h> @@ -36,9 +36,8 @@ void UdpTunnelListener::close() { #ifdef LINUX void UdpTunnelListener::readHandler(std::error_code ec) { - TRANSPORT_LOGD("UdpTunnelConnector receive packet"); + DLOG_IF(INFO, VLOG_IS_ON(3)) << "UdpTunnelConnector receive packet"; - // TRANSPORT_LOGD("UdpTunnelConnector received packet length=%lu", length); if (TRANSPORT_EXPECT_TRUE(!ec)) { if (current_position_ == 0) { for (int i = 0; i < Connector::max_burst; i++) { @@ -56,7 +55,8 @@ void UdpTunnelListener::readHandler(std::error_code ec) { Connector::max_burst - current_position_, MSG_DONTWAIT, nullptr); if (res < 0) { - TRANSPORT_LOGE("Error in recvmmsg."); + LOG(ERROR) << "Error in recvmmsg."; + return; } for (int i = 0; i < res; i++) { @@ -119,10 +119,10 @@ void UdpTunnelListener::readHandler(std::error_code ec) { doRecvPacket(); } else if (ec.value() == static_cast<int>(std::errc::operation_canceled)) { - TRANSPORT_LOGE("The connection has been closed by the application."); + LOG(ERROR) << "The connection has been closed by the application."; return; } else { - TRANSPORT_LOGE("%d %s", ec.value(), ec.message().c_str()); + LOG(ERROR) << ec.value() << " " << ec.message(); } } #endif @@ -165,10 +165,10 @@ void UdpTunnelListener::doRecvPacket() { doRecvPacket(); } else if (ec.value() == static_cast<int>(std::errc::operation_canceled)) { - TRANSPORT_LOGE("The connection has been closed by the application."); + LOG(ERROR) << "The connection has been closed by the application."; return; } else { - TRANSPORT_LOGE("%d %s", ec.value(), ec.message().c_str()); + LOG(ERROR) << ec.value() << " " << ec.message(); } }); #endif |