aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2019-02-18 10:44:04 +0000
committerGerrit Code Review <gerrit@fd.io>2019-02-18 10:44:04 +0000
commit7465d7ee3fbae80d24342930ad78682a6e674bb9 (patch)
tree718681628a345ab97ffd3a35403cd746a0d402c3 /libtransport
parent75af12024ef5c33040e0771972e3fce01e48a9e4 (diff)
parentbbb74d387bf983351d1d4106d31f0c8068ce52ca (diff)
Merge "[HICN-67] add interest callback in RTC producer socket"
Diffstat (limited to 'libtransport')
-rw-r--r--libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc
index 740e03c3c..ede1ff247 100644
--- a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc
+++ b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc
@@ -145,9 +145,12 @@ void RTCProducerSocket::onInterest(Interest::Ptr &&interest) {
uint32_t lifetime = interest->getLifetime();
uint32_t max_gap;
- // XXX
+ if (on_interest_input_ != VOID_HANDLER) {
+ on_interest_input_(*this, *interest);
+ }
+
// packetsProductionRate_ is modified by another thread in updateStats
- // this should be safe since I just read here. but, you never know.
+ // this should be safe since I just read here.
max_gap = (uint32_t)floor(
(double)((double)((double)lifetime * INTEREST_LIFETIME_REDUCTION_FACTOR /
1000.0) *