Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
stringify a bit
[simgrid.git] / src / surf / network_ns3.cpp
index dd0e1c9..a9139b1 100644 (file)
@@ -166,7 +166,7 @@ NetworkNS3Model::~NetworkNS3Model() {
   xbt_dict_free(&flowFromSock);
 }
 
-LinkImpl* NetworkNS3Model::createLink(const char* name, double bandwidth, double latency,
+LinkImpl* NetworkNS3Model::createLink(const std::string& name, double bandwidth, double latency,
                                       e_surf_link_sharing_policy_t policy)
 {
   return new LinkNS3(this, name, bandwidth, latency);
@@ -237,8 +237,7 @@ void NetworkNS3Model::updateActionsState(double now, double delta)
     if(sgFlow->finished_){
       xbt_dynar_push(socket_to_destroy,&ns3Socket);
       XBT_DEBUG("Destroy socket %p of action %p", ns3Socket, action);
-      action->finish();
-      action->setState(Action::State::done);
+      action->finish(Action::State::done);
     }
   }
 
@@ -257,7 +256,7 @@ void NetworkNS3Model::updateActionsState(double now, double delta)
  * Resource *
  ************/
 
-LinkNS3::LinkNS3(NetworkNS3Model* model, const char* name, double bandwidth, double latency)
+LinkNS3::LinkNS3(NetworkNS3Model* model, const std::string& name, double bandwidth, double latency)
     : LinkImpl(model, name, nullptr)
 {
   bandwidth_.peak = bandwidth;