Bug 793: no creation of a new simulator when calling simulator::cancel or remove or IsExpired
This commit is contained in:
@@ -291,6 +291,10 @@ void
|
||||
Simulator::Remove (const EventId &ev)
|
||||
{
|
||||
NS_LOG_FUNCTION (&ev);
|
||||
if (*PeekImpl () == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
return GetImpl ()->Remove (ev);
|
||||
}
|
||||
|
||||
@@ -298,6 +302,10 @@ void
|
||||
Simulator::Cancel (const EventId &ev)
|
||||
{
|
||||
NS_LOG_FUNCTION (&ev);
|
||||
if (*PeekImpl () == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
return GetImpl ()->Cancel (ev);
|
||||
}
|
||||
|
||||
@@ -305,6 +313,10 @@ bool
|
||||
Simulator::IsExpired (const EventId &id)
|
||||
{
|
||||
NS_LOG_FUNCTION (&id);
|
||||
if (*PeekImpl () == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return GetImpl ()->IsExpired (id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user