From 1e6b0a52bef29bab9fd6754500c4e67206b07e7c Mon Sep 17 00:00:00 2001 From: Marion Guthmuller Date: Mon, 3 Dec 2012 19:07:15 +0100 Subject: [PATCH] model-checker : fix MC_state_set_executed_request Comm for SIMCALL_COMM_WAIT was internal_comm address of mc_state (confusion between s_smx_action_t and smx_action_t) --- src/mc/mc_state.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mc/mc_state.c b/src/mc/mc_state.c index 7faf1f1260..c1808d1a02 100644 --- a/src/mc/mc_state.c +++ b/src/mc/mc_state.c @@ -86,7 +86,7 @@ void MC_state_set_executed_request(mc_state_t state, smx_simcall_t req, int valu state->internal_req.call = SIMCALL_COMM_WAIT; state->internal_req.issuer = req->issuer; state->internal_comm = *xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), value, smx_action_t); - simcall_comm_wait__set__comm(&state->internal_req, &state->internal_comm); + simcall_comm_wait__set__comm(&state->internal_req, xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), value, smx_action_t)); simcall_comm_wait__set__timeout(&state->internal_req, 0); break; @@ -97,22 +97,22 @@ void MC_state_set_executed_request(mc_state_t state, smx_simcall_t req, int valu if(value > 0) state->internal_comm = *xbt_dynar_get_as(simcall_comm_testany__get__comms(req), value, smx_action_t); - simcall_comm_test__set__comm(&state->internal_req, &state->internal_comm); + simcall_comm_test__set__comm(&state->internal_req, xbt_dynar_get_as(simcall_comm_testany__get__comms(req), value, smx_action_t)); simcall_comm_test__set__result(&state->internal_req, value); break; case SIMCALL_COMM_WAIT: state->internal_req = *req; state->internal_comm = *(simcall_comm_wait__get__comm(req)); - simcall_comm_wait__set__comm(&state->executed_req, &state->internal_comm); - simcall_comm_wait__set__comm(&state->internal_req, &state->internal_comm); + simcall_comm_wait__set__comm(&state->executed_req, simcall_comm_wait__get__comm(req)); + simcall_comm_wait__set__comm(&state->internal_req, simcall_comm_wait__get__comm(req)); break; case SIMCALL_COMM_TEST: state->internal_req = *req; state->internal_comm = *simcall_comm_test__get__comm(req); - simcall_comm_test__set__comm(&state->executed_req, &state->internal_comm); - simcall_comm_test__set__comm(&state->internal_req, &state->internal_comm); + simcall_comm_test__set__comm(&state->executed_req, simcall_comm_test__get__comm(req)); + simcall_comm_test__set__comm(&state->internal_req, simcall_comm_test__get__comm(req)); break; default: -- 2.20.1