OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000965OMNeT++IDE / C++ developmentpublic2016-08-11 13:352017-03-02 13:20
yonatanshe 
andras 
normalminorhave not tried
resolvedfixed 
 
5.1pre3 
0000965: wrong message arrival order when changing messages priority
if we send two messages like this:
send(simTime(),msg1); //with prio 0
send(simTime(),msg2); //with negative prio
the first message will arrive first, due to that line:

    if (event->getArrivalTime()==simTime() && event->getSchedulingPriority()==0 && (n==0 || h[1]->getArrivalTime()!=simTime()))


in cmessageheap
No tags attached.
Issue History
2016-08-11 13:35yonatansheNew Issue
2017-03-02 13:20andrasNote Added: 0001332
2017-03-02 13:20andrasStatusnew => resolved
2017-03-02 13:20andrasFixed in Version => 5.1pre3
2017-03-02 13:20andrasResolutionopen => fixed
2017-03-02 13:20andrasAssigned To => andras

Notes
(0001332)
andras   
2017-03-02 13:20   
This was fixed as "sim: cEventHeap: fix: events scheduled for current simulation time w/ negative priority were handled incorrectly"

Also see test/core/cEventHeap_stress_1.test