- this->remote_simulation_->clear_cache();
- if (this->remote_simulation_->running())
- checker_side_.dispatch();
+
+ s_mc_message_simcall_execute_answer_t answer;
+ ssize_t s = checker_side_.get_channel().receive(answer);
+ xbt_assert(s != -1, "Could not receive message");
+ xbt_assert(s == sizeof(answer) && answer.type == MessageType::SIMCALL_EXECUTE_ANSWER,
+ "Received unexpected message %s (%i, size=%i) "
+ "expected MessageType::SIMCALL_EXECUTE_ANSWER (%i, size=%i)",
+ to_c_str(answer.type), (int)answer.type, (int)s, (int)MessageType::SIMCALL_EXECUTE_ANSWER,
+ (int)sizeof(answer));
+
+ this->remote_process_->clear_cache();
+ if (this->remote_process_->running())
+ checker_side_.dispatch(); // The app may send messages while processing the transition
+
+ if (new_transition)
+ return recv_transition(transition.aid_, transition.times_considered_, answer.simcall, answer.buffer);
+ else
+ return nullptr;