Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MSG_comm_get_status must be called before MSG_comm_destroy.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 6 Feb 2013 20:26:17 +0000 (21:26 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 6 Feb 2013 20:26:17 +0000 (21:26 +0100)
examples/msg/chainsend/common.c

index 37f2b74..928c6e3 100644 (file)
@@ -10,8 +10,8 @@ int process_pending_connections(xbt_dynar_t q)
   xbt_dynar_foreach(q, iter, comm) {
     empty = 1;
     if (MSG_comm_test(comm)) {
-      MSG_comm_destroy(comm);
       status = MSG_comm_get_status(comm);
+      MSG_comm_destroy(comm);
       xbt_assert(status == MSG_OK, "process_pending_connections() failed");
       xbt_dynar_cursor_rm(q, &iter);
       empty = 0;