X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dff9e15c44ab6340d27215957c56fa72fad246a2..2d5b327d0b5304bc0beaff6aae611dda6dac1b03:/src/surf/surfxml_parse.c?ds=sidebyside diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index 7bac0d6945..be1a261d50 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -506,14 +506,6 @@ void surf_parse_get_int(int *value, const char *string) surf_parse_error(bprintf("%s is not an integer", string)); } -void surf_parse_get_trace(tmgr_trace_t * trace, const char *string) -{ - if ((!string) || (strcmp(string, "") == 0)) - *trace = NULL; - else - *trace = tmgr_trace_new(string); -} - void parse_properties(void) { char *value = NULL; @@ -1025,16 +1017,18 @@ static void convert_route_multi_to_routes(void) char *src_host_name, *dst_host_name, *key, *src, *dst, *val, *key_w, *data_w; const char *sep = "#"; - xbt_dict_t set; + xbt_dict_t set = NULL; xbt_dynar_t src_names = NULL, dst_names = NULL, links; if (!route_multi_elements) return; - set = cpu_set; - DEBUG1("%d", xbt_dict_length(workstation_set)); - if (workstation_set != NULL && xbt_dict_length(workstation_set) > 0) - set = workstation_set; + if (surf_cpu_model) + set = surf_model_resource_set(surf_cpu_model); + if (surf_workstation_model != NULL && + surf_model_resource_set(surf_workstation_model) != NULL && + xbt_dict_length(surf_model_resource_set(surf_workstation_model)) > 0) + set = surf_model_resource_set(surf_workstation_model); push_surfxml_bufferstack(0); @@ -1220,7 +1214,7 @@ static void parse_trace_finalize(void) { tmgr_trace_t trace; if (!trace_file || strcmp(trace_file, "") != 0) { - surf_parse_get_trace(&trace, trace_file); + trace = tmgr_trace_new(trace_file); } else { if (strcmp(surfxml_pcdata, "") == 0) trace = NULL;