From eaaff7fa111c821ed6710dec7b6c49c5ecac6ad4 Mon Sep 17 00:00:00 2001 From: michele papalini Date: Thu, 3 Oct 2019 12:09:01 +0200 Subject: [HICN-291] handle multiple paths in RTC Change-Id: I69d331aa6e953e802e2f4b3e60325f852941fd94 Signed-off-by: michele papalini --- libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libtransport/src/hicn/transport/interfaces') 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 &&buffer) { portal_->sendContentObject(content_object); - currentSeg_++; + currentSeg_ = (currentSeg_ + 1) % HICN_MAX_DATA_SEQ; } void RTCProducerSocket::onInterest(Interest::Ptr &&interest) { -- cgit 1.2.3-korg