Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add V_cluster_availability_file and V_cluster_state_file to struct for cluster.
[simgrid.git] / src / surf / surfxml_parse.c
index 4c38b8d..1515934 100644 (file)
@@ -319,7 +319,8 @@ void STag_surfxml_host_cluster(void){
 }
 void ETag_surfxml_host(void){
        surfxml_call_cb_functions(ETag_surfxml_host_cb_list);
-//     xbt_free(struct_host->V_host_id);
+       xbt_free(struct_host->V_host_id);
+       xbt_free(struct_host);
 }
 
 void STag_surfxml_router(void){
@@ -362,6 +363,9 @@ void STag_surfxml_cluster(void){
        struct_cluster->V_cluster_sharing_policy = AX_surfxml_cluster_sharing_policy;
        struct_cluster->V_cluster_bb_sharing_policy = AX_surfxml_cluster_bb_sharing_policy;
 
+       struct_cluster->V_cluster_availability_file = xbt_strdup(A_surfxml_cluster_availability_file);
+       struct_cluster->V_cluster_state_file = xbt_strdup(A_surfxml_cluster_state_file);
+
        surfxml_call_cb_functions(STag_surfxml_cluster_cb_list);
 }
 void ETag_surfxml_cluster(void){
@@ -370,15 +374,9 @@ void ETag_surfxml_cluster(void){
        xbt_free(struct_cluster->V_cluster_prefix);
        xbt_free(struct_cluster->V_cluster_suffix);
        xbt_free(struct_cluster->V_cluster_radical);
-       struct_cluster->S_cluster_power = 0;
-       struct_cluster->S_cluster_core = 0;
-       struct_cluster->S_cluster_bw = 0;
-       struct_cluster->S_cluster_lat = 0;
-       struct_cluster->S_cluster_bb_bw = 0;
-       struct_cluster->S_cluster_bb_lat = 0;
        xbt_free(struct_cluster->S_cluster_router_id);
-       struct_cluster->V_cluster_sharing_policy = 0;
-       struct_cluster->V_cluster_bb_sharing_policy = 0;
+       xbt_free(struct_cluster->V_cluster_availability_file);
+       xbt_free(struct_cluster->V_cluster_state_file);
        xbt_free(struct_cluster);
 }
 
@@ -441,6 +439,8 @@ void STag_surfxml_link_cluster(void){
 }
 void ETag_surfxml_link(void){
        surfxml_call_cb_functions(ETag_surfxml_link_cb_list);
+       xbt_free(struct_lnk->V_link_id);
+       xbt_free(struct_lnk);
 }
 
 void STag_surfxml_route(void){