aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/hicn/transport/interfaces
diff options
context:
space:
mode:
authormichele papalini <micpapal@cisco.com>2019-10-03 12:09:01 +0200
committermichele papalini <micpapal@cisco.com>2019-10-03 13:23:48 +0200
commiteaaff7fa111c821ed6710dec7b6c49c5ecac6ad4 (patch)
tree5faa53d3e0f73f703b0526f2c1295f1359d96062 /libtransport/src/hicn/transport/interfaces
parent523f12c368a3067527546efae5922150281ac203 (diff)
[HICN-291] handle multiple paths in RTC
Change-Id: I69d331aa6e953e802e2f4b3e60325f852941fd94 Signed-off-by: michele papalini <micpapal@cisco.com>
Diffstat (limited to 'libtransport/src/hicn/transport/interfaces')
-rw-r--r--libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc
index 6a45019a4..481b42a10 100644
--- a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc
+++ b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc
@@ -29,6 +29,8 @@
// is considered inactive
#define MILLI_IN_A_SEC 1000 // ms in a second
+#define HICN_MAX_DATA_SEQ 0xefffffff
+
// NACK HEADER
// +-----------------------------------------+
// | 4 bytes: current segment in production |
@@ -157,7 +159,7 @@ void RTCProducerSocket::produce(std::unique_ptr<utils::MemBuf> &&buffer) {
portal_->sendContentObject(content_object);
- currentSeg_++;
+ currentSeg_ = (currentSeg_ + 1) % HICN_MAX_DATA_SEQ;
}
void RTCProducerSocket::onInterest(Interest::Ptr &&interest) {