X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/14262a27cd78687e6a762eff0e58166fd35e5625..32965191d7fcfb85c4f0da9f118826b70f7d32ba:/src/msg/msg_environment.cpp diff --git a/src/msg/msg_environment.cpp b/src/msg/msg_environment.cpp index 733814c377..3c3bdf8693 100644 --- a/src/msg/msg_environment.cpp +++ b/src/msg/msg_environment.cpp @@ -65,7 +65,11 @@ msg_netzone_t MSG_environment_as_get_by_name(const char* name) xbt_dict_t MSG_environment_as_get_routing_sons(msg_netzone_t netzone) { - return netzone->children(); + xbt_dict_t res = xbt_dict_new_homogeneous(nullptr); + for (auto elem : *netzone->children()) { + xbt_dict_set(res, elem->name(), static_cast(elem), nullptr); + } + return res; } const char* MSG_environment_as_get_property_value(msg_netzone_t netzone, const char* name) @@ -82,7 +86,7 @@ xbt_dynar_t MSG_environment_as_get_hosts(msg_netzone_t netzone) { xbt_dynar_t res = xbt_dynar_new(sizeof(sg_host_t), nullptr); - for (auto host : netzone->hosts()) { + for (auto host : *netzone->hosts()) { xbt_dynar_push(res, &host); }