]> git.tdb.fi Git - r2c2.git/commitdiff
Make sure Block::signal_reserved is emitted consistently
authorMikko Rasa <tdb@tdb.fi>
Fri, 6 Feb 2015 14:37:46 +0000 (16:37 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 6 Feb 2015 14:48:23 +0000 (16:48 +0200)
Sigc++ apparently takes arguments as references, so if someone reached to
a signal with null train by reserving the block again, any remaining slots
of the release emission would also get the new train pointer.  This caused
the routing system to malfunction in certain cases as the router saw two
emissions for the same block reservation.

The simplest solution would be to pass t instead of train to emit(), but
then the ordering of the two emissions would be inconsistent.  Thus the
additional logic to delay further emissions until the outstanding one is
completed.


No differences found