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

(-)a/src/node/node.cc (-18 / +4 lines)
 Lines 108-113    Link Here 
108
  device->SetNode (this);
108
  device->SetNode (this);
109
  device->SetIfIndex(index);
109
  device->SetIfIndex(index);
110
  device->SetReceiveCallback (MakeCallback (&Node::NonPromiscReceiveFromDevice, this));
110
  device->SetReceiveCallback (MakeCallback (&Node::NonPromiscReceiveFromDevice, this));
111
  Simulator::ScheduleWithContext (GetId (), Seconds (0.0), 
112
                                  &NetDevice::Start, device);
111
  NotifyDeviceAdded (device);
113
  NotifyDeviceAdded (device);
112
  return index;
114
  return index;
113
}
115
}
 Lines 130-135    Link Here 
130
  uint32_t index = m_applications.size ();
132
  uint32_t index = m_applications.size ();
131
  m_applications.push_back (application);
133
  m_applications.push_back (application);
132
  application->SetNode (this);
134
  application->SetNode (this);
135
  Simulator::ScheduleWithContext (GetId (), Seconds (0.0), 
136
                                  &Application::Start, application);
133
  return index;
137
  return index;
134
}
138
}
135
Ptr<Application> 
139
Ptr<Application> 
 Lines 167-190    Link Here 
167
  m_applications.clear ();
171
  m_applications.clear ();
168
  Object::DoDispose ();
172
  Object::DoDispose ();
169
}
173
}
170
void 
171
Node::DoStart (void)
172
{
173
  for (std::vector<Ptr<NetDevice> >::iterator i = m_devices.begin ();
174
       i != m_devices.end (); i++)
175
    {
176
      Ptr<NetDevice> device = *i;
177
      device->Start ();
178
    }
179
  for (std::vector<Ptr<Application> >::iterator i = m_applications.begin ();
180
       i != m_applications.end (); i++)
181
    {
182
      Ptr<Application> application = *i;
183
      application->Start ();
184
    }
185
  
186
  Object::DoStart ();
187
}
188
174
189
void 
175
void 
190
Node::NotifyDeviceAdded (Ptr<NetDevice> device)
176
Node::NotifyDeviceAdded (Ptr<NetDevice> device)
(-)a/src/node/node.h (-1 lines)
 Lines 186-192    Link Here 
186
   * end of their own DoDispose method.
186
   * end of their own DoDispose method.
187
   */
187
   */
188
  virtual void DoDispose (void);
188
  virtual void DoDispose (void);
189
  virtual void DoStart (void);
190
private:
189
private:
191
190
192
  /**
191
  /**

Return to bug 752