aboutsummaryrefslogtreecommitdiffstats
path: root/icnet
diff options
context:
space:
mode:
authorMauro Sardara <msardara+fdio@cisco.com>2017-09-22 15:44:01 +0200
committerMauro Sardara <msardara+fdio@cisco.com>2017-09-22 15:44:01 +0200
commit9feade6d7afdfb1075877e6e098e64550351b333 (patch)
treea8b73d7ed2745c71357a475ae888091ab0d444b1 /icnet
parent4bd049e639d80028ccdc909c0fef2de4e810cf50 (diff)
Add simple applications for ICN17 tutorial
Change-Id: Ic76e73c87e0313056356a02d8ec45d6e337288cb Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'icnet')
-rw-r--r--icnet/http/icnet_http_server_publisher.cc4
-rw-r--r--icnet/transport/icnet_transport_socket_producer.cc1
-rw-r--r--icnet/transport/icnet_transport_socket_producer.h2
3 files changed, 3 insertions, 4 deletions
diff --git a/icnet/http/icnet_http_server_publisher.cc b/icnet/http/icnet_http_server_publisher.cc
index e42154b2..82c90051 100644
--- a/icnet/http/icnet_http_server_publisher.cc
+++ b/icnet/http/icnet_http_server_publisher.cc
@@ -39,9 +39,7 @@ HTTPServerPublisher& HTTPServerPublisher::attachPublisher() {
HTTPServerPublisher &HTTPServerPublisher::setTimeout(uint32_t timeout) {
std::shared_ptr<transport::Portal> portal;
producer_->getSocketOption(transport::GeneralTransportOptions::PORTAL, portal);
- timer_ = std::unique_ptr<boost::asio::deadline_timer>(new boost::asio::deadline_timer(portal->getIoService(),
- boost::posix_time::seconds(
- timeout)));
+ timer_ = std::unique_ptr<boost::asio::deadline_timer>(new boost::asio::deadline_timer(portal->getIoService(), boost::posix_time::seconds(timeout)));
wait_callback_ = [this](const boost::system::error_code e) {
if (!e) {
diff --git a/icnet/transport/icnet_transport_socket_producer.cc b/icnet/transport/icnet_transport_socket_producer.cc
index ec5f665f..7be2fbd1 100644
--- a/icnet/transport/icnet_transport_socket_producer.cc
+++ b/icnet/transport/icnet_transport_socket_producer.cc
@@ -183,6 +183,7 @@ void ProducerSocket::produce(Name name, const uint8_t *buf, size_t buffer_size,
seq_number_map_[name.toString()][response_id] = current_segment;
}
+
if (making_manifest_) {
std::shared_ptr<ContentObject> content_object_segment;
diff --git a/icnet/transport/icnet_transport_socket_producer.h b/icnet/transport/icnet_transport_socket_producer.h
index 4f98f9e2..588ee2d6 100644
--- a/icnet/transport/icnet_transport_socket_producer.h
+++ b/icnet/transport/icnet_transport_socket_producer.h
@@ -44,7 +44,7 @@ class ProducerSocket : public Socket {
void dispatch();
- void produce(Name name, const uint8_t *buffer, size_t buffer_size, const int request_id = 0, bool is_last = false);
+ void produce(Name name, const uint8_t *buffer, size_t buffer_size, const int request_id = 0, bool is_last = true);
void produce(ContentObject &content_object);