summaryrefslogtreecommitdiffstats
path: root/apps/http-proxy/src/icn_receiver.cc
diff options
context:
space:
mode:
authorMauro <you@example.com>2021-06-30 07:57:22 +0000
committerMauro Sardara <msardara@cisco.com>2021-07-06 16:16:04 +0000
commit08233d44a6cfde878d7e10bca38ae935ed1c8fd5 (patch)
tree7ecc534d55bdc7e8dd15ecab084720910bcdf4d9 /apps/http-proxy/src/icn_receiver.cc
parent147ba39bed26887f5eba84757e2463ab8e370a9a (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 'apps/http-proxy/src/icn_receiver.cc')
-rw-r--r--apps/http-proxy/src/icn_receiver.cc24
1 files changed, 11 insertions, 13 deletions
diff --git a/apps/http-proxy/src/icn_receiver.cc b/apps/http-proxy/src/icn_receiver.cc
index 23e5b5623..ea8ac7191 100644
--- a/apps/http-proxy/src/icn_receiver.cc
+++ b/apps/http-proxy/src/icn_receiver.cc
@@ -55,28 +55,28 @@ AsyncConsumerProducer::AsyncConsumerProducer(
interface::GeneralTransportOptions::OUTPUT_BUFFER_SIZE, cache_size_);
if (ret != SOCKET_OPTION_SET) {
- TRANSPORT_LOGD("Warning: output buffer size has not been set.");
+ TRANSPORT_LOG_WARNING << "Warning: output buffer size has not been set.";
}
ret = producer_socket_.setSocketOption(
interface::GeneralTransportOptions::MAKE_MANIFEST, manifest);
if (ret != SOCKET_OPTION_SET) {
- TRANSPORT_LOGD("Warning: impossible to enable signatures.");
+ TRANSPORT_LOG_WARNING << "Warning: impossible to enable signatures.";
}
ret = producer_socket_.setSocketOption(
interface::GeneralTransportOptions::DATA_PACKET_SIZE, mtu_);
if (ret != SOCKET_OPTION_SET) {
- TRANSPORT_LOGD("Warning: mtu has not been set.");
+ TRANSPORT_LOG_WARNING << "Warning: mtu has not been set.";
}
producer_socket_.registerPrefix(prefix_);
}
void AsyncConsumerProducer::start() {
- TRANSPORT_LOGD("Starting listening");
+ TRANSPORT_LOG_INFO << "Starting listening";
doReceive();
}
@@ -90,8 +90,8 @@ void AsyncConsumerProducer::run() {
void AsyncConsumerProducer::stop() {
io_service_.post([this]() {
- TRANSPORT_LOGI("Number of requests processed by plugin: %lu",
- (unsigned long)request_counter_);
+ TRANSPORT_LOG_INFO << "Number of requests processed by plugin: "
+ << request_counter_;
producer_socket_.stop();
connector_.close();
});
@@ -123,16 +123,14 @@ void AsyncConsumerProducer::manageIncomingInterest(
if (_it != _end) {
if (_it->second.second) {
- TRANSPORT_LOGD(
- "Content is in production, interests will be satisfied shortly.");
return;
}
if (seg >= _it->second.first) {
- TRANSPORT_LOGD(
- "Ignoring interest with name %s for a content object which does not "
- "exist. (Request: %u, max: %u)",
- name.toString().c_str(), (uint32_t)seg, (uint32_t)_it->second.first);
+ // TRANSPORT_LOGD(
+ // "Ignoring interest with name %s for a content object which does not "
+ // "exist. (Request: %u, max: %u)",
+ // name.toString().c_str(), (uint32_t)seg, (uint32_t)_it->second.first);
return;
}
}
@@ -170,7 +168,7 @@ void AsyncConsumerProducer::publishContent(const uint8_t* data,
options.getLifetime());
if (TRANSPORT_EXPECT_FALSE(ret != SOCKET_OPTION_SET)) {
- TRANSPORT_LOGD("Warning: content object lifetime has not been set.");
+ TRANSPORT_LOG_WARNING << "Warning: content object lifetime has not been set.";
}
const interface::Name& name = options.getName();