1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

path: reset sample length after simulation restart

This commit is contained in:
Steffen Vogel 2019-04-08 10:05:20 +02:00
parent a0fd932ee2
commit 9ab2eee357

View file

@ -121,6 +121,12 @@ int path_source_read(struct path_source *ps, struct path *p, int i)
muxed_smps[i]->flags |= SAMPLE_HAS_SEQUENCE;
}
/* We reset the sample length after each restart of the simulation.
* This is necessary for the test_rtt node to work properly.
*/
if (tomux_smps[i]->flags & SAMPLE_IS_FIRST)
muxed_smps[i]->length = 0;
muxed_smps[i]->ts = tomux_smps[i]->ts;
muxed_smps[i]->flags |= tomux_smps[i]->flags & (SAMPLE_HAS_TS_ORIGIN | SAMPLE_HAS_TS_RECEIVED);