[HICN-623] Initialize all the callbacks before starting a new RTC session. 15/27415/1
authorMauro Sardara <msardara@cisco.com>
Wed, 3 Jun 2020 21:51:52 +0000 (23:51 +0200)
committerMauro Sardara <msardara@cisco.com>
Wed, 3 Jun 2020 21:51:52 +0000 (23:51 +0200)
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: Ic4b08e7eb0f01c9e5710d4da1ca68c6120dcd57e

libtransport/src/protocols/rtc.cc
libtransport/src/protocols/rtc.h

index 4fb3526..3b10c74 100644 (file)
@@ -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() {
index f15cdd1..a12c96b 100644 (file)
@@ -95,7 +95,7 @@ class RTCTransportProtocol : public TransportProtocol,
 
   int start() override;
 
-  void stop() override;
+  using TransportProtocol::stop;
 
   void resume() override;