Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Move networkLinkCreatedCallbacks outside of constructor
[simgrid.git] / src / surf / network_cm02.cpp
index c5c242b..1d5b594 100644 (file)
@@ -215,8 +215,10 @@ Link* NetworkCm02Model::createLink(const char *name,
              "Link '%s' declared several times in the platform",
              name);
 
-  return new NetworkCm02Link(this, name, properties, p_maxminSystem, sg_bandwidth_factor * bw_initial, history,
+  Link* link = new NetworkCm02Link(this, name, properties, p_maxminSystem, sg_bandwidth_factor * bw_initial, history,
                                             state_initial, state_trace, bw_initial, bw_trace, lat_initial, lat_trace, policy);
+  surf_callback_emit(networkLinkCreatedCallbacks, link);
+  return link;
 }
 
 void NetworkCm02Model::updateActionsStateLazy(double now, double /*delta*/)