Commit 4f536d0b authored by Simon Tenbusch's avatar Simon Tenbusch
Browse files

[horizon-4] fixed segfault that appeared when record-eventlog=true was set

parent 6525f767
......@@ -669,11 +669,6 @@ void cSimulation::doOneEvent(cMessage* msg)
throw cRuntimeError("Activity-Model not supported with Horizon.");
}
EVCB.simulationEvent(msg);
// store arrival event number of this message; it is useful input for the
// sequence chart tool if the message doesn't get immediately deleted or
// sent out again
msg->setPreviousEventNumber(event_num);
// check if this module supports parallel execution
if (mod->isAsyncModule())
{
......@@ -705,6 +700,13 @@ void cSimulation::doOneEvent(cMessage* msg)
// set the context for sequential execution
setContext(mod);
setContextType(CTX_EVENT);
EVCB.simulationEvent(msg);
// store arrival event number of this message; it is useful input for the
// sequence chart tool if the message doesn't get immediately deleted or
// sent out again
msg->setPreviousEventNumber(event_num);
// take ownership in callHandleMessage after concurrency check
aMod->callHandleMessage(msg);
// unset busy to release module for further events
......@@ -717,6 +719,13 @@ void cSimulation::doOneEvent(cMessage* msg)
// set the context for sequential execution
setContext(mod);
setContextType(CTX_EVENT);
EVCB.simulationEvent(msg);
// store arrival event number of this message; it is useful input for the
// sequence chart tool if the message doesn't get immediately deleted or
// sent out again
msg->setPreviousEventNumber(event_num);
// take owner here: no danger of a race condition since
// simple modules are only called from here
mod->take(msg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment