View | Details | Raw Unified | Return to bug 259
Collapse All | Expand All

(-)a/src/applications/onoff/onoff-application.cc (-1 / +9 lines)
 Lines 135-141   void OnOffApplication::StartApplication( Link Here 
135
      m_socket->Connect (m_peer);
135
      m_socket->Connect (m_peer);
136
    }
136
    }
137
  // Insure no pending event
137
  // Insure no pending event
138
  StopApplication();
138
  CancelEvents ();
139
  // If we are not yet connected, there is nothing to do here
139
  // If we are not yet connected, there is nothing to do here
140
  // The ConnectionComplete upcall will start timers at that time
140
  // The ConnectionComplete upcall will start timers at that time
141
  //if (!m_connected) return;
141
  //if (!m_connected) return;
 Lines 143-148   void OnOffApplication::StartApplication( Link Here 
143
}
143
}
144
144
145
void OnOffApplication::StopApplication() // Called at time specified by Stop
145
void OnOffApplication::StopApplication() // Called at time specified by Stop
146
{
147
  NS_LOG_FUNCTION_NOARGS ();
148
149
  CancelEvents ();
150
  m_socket->Close ();
151
}
152
153
void OnOffApplication::CancelEvents ()
146
{
154
{
147
  NS_LOG_FUNCTION_NOARGS ();
155
  NS_LOG_FUNCTION_NOARGS ();
148
156
(-)a/src/applications/onoff/onoff-application.h (+3 lines)
 Lines 83-88   private: Link Here 
83
  virtual void StartApplication (void);    // Called at time specified by Start
83
  virtual void StartApplication (void);    // Called at time specified by Start
84
  virtual void StopApplication (void);     // Called at time specified by Stop
84
  virtual void StopApplication (void);     // Called at time specified by Stop
85
85
86
  //helpers
87
  void CancelEvents ();
88
86
  void Construct (Ptr<Node> n,
89
  void Construct (Ptr<Node> n,
87
                  const Address &remote,
90
                  const Address &remote,
88
                  std::string tid,
91
                  std::string tid,

Return to bug 259