Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do not answer the request twice
[simgrid.git] / src / simix / smx_network.c
index edbd940..befa2fd 100644 (file)
@@ -347,8 +347,7 @@ void SIMIX_pre_comm_test(smx_req_t req)
   if (req->comm_test.result) {
     xbt_fifo_push(action->request_list, req);
     SIMIX_comm_finish(action);
   if (req->comm_test.result) {
     xbt_fifo_push(action->request_list, req);
     SIMIX_comm_finish(action);
-  }
-  else {
+  } else {
     SIMIX_request_answer(req);
   }
 }
     SIMIX_request_answer(req);
   }
 }
@@ -363,7 +362,7 @@ void SIMIX_pre_comm_testany(smx_req_t req)
       req->comm_testany.result = cursor;
       xbt_fifo_push(action->request_list, req);
       SIMIX_comm_finish(action);
       req->comm_testany.result = cursor;
       xbt_fifo_push(action->request_list, req);
       SIMIX_comm_finish(action);
-      break;
+      return;
     }
   }
   SIMIX_request_answer(req);
     }
   }
   SIMIX_request_answer(req);