Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MSG_storages_as_dynar() bug fix
authorPierre Veyre <pierre.veyre@cc.in2p3.fr>
Mon, 10 Mar 2014 13:55:06 +0000 (14:55 +0100)
committerPierre Veyre <pierre.veyre@cc.in2p3.fr>
Mon, 10 Mar 2014 13:55:06 +0000 (14:55 +0100)
src/msg/msg_io.c

index c2b108e..d32b194 100644 (file)
@@ -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;
 }