From: Pierre Veyre Date: Mon, 10 Mar 2014 13:55:06 +0000 (+0100) Subject: MSG_storages_as_dynar() bug fix X-Git-Tag: v3_11~223 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3008451188ee6269b44d84ab6df4ecd6e2daef31?hp=e50d4a9de8334346d43f962316c081e0069e56b3 MSG_storages_as_dynar() bug fix --- diff --git a/src/msg/msg_io.c b/src/msg/msg_io.c index c2b108e69e..d32b194efe 100644 --- a/src/msg/msg_io.c +++ b/src/msg/msg_io.c @@ -352,12 +352,11 @@ xbt_dynar_t MSG_storages_as_dynar(void) { xbt_dynar_t res = xbt_dynar_new(sizeof(msg_storage_t),NULL); xbt_lib_foreach(storage_lib, cursor, key, data) { - if(routing_get_network_element_type(key) == MSG_STORAGE_LEVEL) { + if(xbt_lib_get_level(xbt_lib_get_elm_or_null(storage_lib, key), MSG_STORAGE_LEVEL) != NULL) { xbt_dictelm_t elm = xbt_dict_cursor_get_elm(cursor); xbt_dynar_push(res, &elm); } } - return res; }