Python: only call ns3::Simulator::RunOne if we're running the default event scheduler; partially fixes Bug 631.
This commit is contained in:
@@ -285,7 +285,15 @@ _wrap_Simulator_Run(PyNs3Simulator *PYBINDGEN_UNUSED(dummy), PyObject *args, PyO
|
||||
PyObject **return_exception)
|
||||
{
|
||||
const char *keywords[] = {"signal_check_frequency", NULL};
|
||||
int signal_check_frequency = 100;
|
||||
int signal_check_frequency;
|
||||
|
||||
ns3::Ptr<ns3::DefaultSimulatorImpl> defaultSim =
|
||||
ns3::DynamicCast<ns3::DefaultSimulatorImpl> (ns3::Simulator::GetImplementation ());
|
||||
if (defaultSim) {
|
||||
signal_check_frequency = 100;
|
||||
} else {
|
||||
signal_check_frequency = -1;
|
||||
}
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "|i", (char **) keywords, &signal_check_frequency)) {
|
||||
PyObject *exc_type, *traceback;
|
||||
|
||||
Reference in New Issue
Block a user