Bug 959 - Simulation never finishes when using RealtimeSimulatorImpl
Simulation never finishes when using RealtimeSimulatorImpl
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: core
pre-release
All All
: P5 normal
Assigned To: Craig Dowell
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-22 07:43 EDT by alina
Modified: 2010-08-16 13:44 EDT (History)
4 users (show)

See Also:


Attachments
patch for RealtimeSimulatorImpl::RunOneEvent (485 bytes, patch)
2010-07-22 07:43 EDT, alina
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description alina 2010-07-22 07:43:00 EDT
Created attachment 942 [details]
patch for RealtimeSimulatorImpl::RunOneEvent

In RealtimeSimulatorImpl::RunOneEvent the value next.key.m_ts is being assigned to the m_currentUid member. Instead next.key.m_uid should be assigned.
This provokes RealtimeSimulatorImpl::Cancel to not perform the cancellation of the next(last) event because RealtimeSimulatorImpl::IsExpired returns true when it should not.
Comment 1 Tom Henderson 2010-08-13 01:58:02 EDT
I do not have a testcase for this (the existing realtime examples seem to work without the patch) but I haven't seen any side effects on the realtime tests from including this patch, so I think it is a candidate for merging.
Comment 2 Josh Pelkey 2010-08-16 13:44:52 EDT
changeset: bcf8ecccfe23