From 9e5f41ed6ebe64a789916794626485460078c420 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Sat, 19 Jan 2019 01:29:33 +0100 Subject: - Code style fix - Improved vpp binary api interface - Correction in object pool destructor - Fix error in Memif Connector Change-Id: Id1dd9219fc1ac0b3717ae019ebff17373bebc635 Signed-off-by: Mauro Sardara --- libtransport/src/hicn/transport/protocols/vegas.cc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/vegas.cc (limited to 'libtransport/src/hicn/transport/protocols/vegas.cc') diff --git a/libtransport/src/hicn/transport/protocols/vegas.cc b/libtransport/src/hicn/transport/protocols/vegas.cc old mode 100755 new mode 100644 index b6d79bfcc..1431020a6 --- a/libtransport/src/hicn/transport/protocols/vegas.cc +++ b/libtransport/src/hicn/transport/protocols/vegas.cc @@ -95,9 +95,7 @@ void VegasTransportProtocol::reset() { void VegasTransportProtocol::start( utils::SharableVector &content_buffer) { - - if(is_running_) - return; + if (is_running_) return; socket_->t0_ = std::chrono::steady_clock::now(); @@ -110,15 +108,13 @@ void VegasTransportProtocol::start( portal_->runEventsLoop(); removeAllPendingInterests(); is_running_ = false; - } -void VegasTransportProtocol::resume(){ - if(is_running_) - return; +void VegasTransportProtocol::resume() { + if (is_running_) return; is_running_ = true; - sendInterest(next_suffix_++); + sendInterest(next_suffix_++); portal_->runEventsLoop(); removeAllPendingInterests(); is_running_ = false; @@ -539,7 +535,7 @@ void VegasTransportProtocol::reassemble() { uint64_t index = last_reassembled_segment_; auto it = receive_buffer_.find(index); - do { + while (it != receive_buffer_.end()) { if (it->second->getPayloadType() == PayloadType::CONTENT_OBJECT) { copyContent(*it->second); receive_buffer_.erase(it); @@ -547,7 +543,7 @@ void VegasTransportProtocol::reassemble() { index = ++last_reassembled_segment_; it = receive_buffer_.find(index); - } while (it != receive_buffer_.end()); + } } void VegasTransportProtocol::partialDownload() { -- cgit 1.2.3-korg