- xbt_lib_foreach(host_lib, cursor, name, surf_workstation){
- if(surf_workstation[SURF_HOST_LEVEL])
- __SD_workstation_create(surf_workstation[SURF_HOST_LEVEL], NULL);
+ {
+ xbt_dict_cursor_t cursor = NULL;
+ simgrid_Host* host = NULL;
+ xbt_dict_foreach(host_list, cursor, name, host){
+ surf_Host* surf_host = (surf_Host*) sg_host_get_facet(host, SURF_HOST_LEVEL);
+ if (surf_host != NULL)
+ __SD_workstation_create(surf_host, NULL);
+ }