From: Mikko Rasa Date: Fri, 6 Feb 2015 14:37:46 +0000 (+0200) Subject: Make sure Block::signal_reserved is emitted consistently X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=ece91e92af821bd6b468bd1134302efb7c28f019;hp=ece91e92af821bd6b468bd1134302efb7c28f019;p=r2c2.git Make sure Block::signal_reserved is emitted consistently 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. ---