From 2dcaaefd65f3b515aeda0848ff4e757cf2c4b82d Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Wed, 3 Jun 2020 23:51:52 +0200 Subject: [HICN-623] Initialize all the callbacks before starting a new RTC session. Signed-off-by: Mauro Sardara Change-Id: Ic4b08e7eb0f01c9e5710d4da1ca68c6120dcd57e --- libtransport/src/protocols/rtc.cc | 20 +------------------- libtransport/src/protocols/rtc.h | 2 +- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/libtransport/src/protocols/rtc.cc b/libtransport/src/protocols/rtc.cc index 4fb352623..3b10c7467 100644 --- a/libtransport/src/protocols/rtc.cc +++ b/libtransport/src/protocols/rtc.cc @@ -52,26 +52,8 @@ int RTCTransportProtocol::start() { probeRtt(); sentinelTimer(); newRound(); - scheduleNextInterests(); - - is_first_ = false; - is_running_ = true; - - if (is_async_) { - portal_->runEventsLoop(); - is_running_ = false; - } - return 0; -} - -void RTCTransportProtocol::stop() { - if (!is_running_) return; - is_running_ = false; - - if (is_async_) { - portal_->stopEventsLoop(); - } + return TransportProtocol::start(); } void RTCTransportProtocol::resume() { diff --git a/libtransport/src/protocols/rtc.h b/libtransport/src/protocols/rtc.h index f15cdd1eb..a12c96b69 100644 --- a/libtransport/src/protocols/rtc.h +++ b/libtransport/src/protocols/rtc.h @@ -95,7 +95,7 @@ class RTCTransportProtocol : public TransportProtocol, int start() override; - void stop() override; + using TransportProtocol::stop; void resume() override; -- cgit 1.2.3-korg