Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
change way disks are managed in the XML parsing
[simgrid.git] / src / bindings / lua / lua_platf.cpp
index 3ad9dc8..d569454 100644 (file)
@@ -210,7 +210,8 @@ int console_add_host(lua_State *L) {
       host.state_trace = simgrid::kernel::profile::Profile::from_file(filename);
   lua_pop(L, 1);
 
-  sg_platf_new_host(&host);
+  sg_platf_new_host_begin(&host);
+  sg_platf_new_host_seal(0);
 
   return 0;
 }
@@ -311,7 +312,7 @@ int console_add_router(lua_State* L) {
   const char* coords = lua_tostring(L, -1);
   lua_pop(L,1);
 
-  sg_platf_new_router(name, coords);
+  sg_platf_new_router(name, coords ? coords : "");
 
   return 0;
 }