From 9ab2eee357181e4f5e2bb8215c68a49cdd8f15ef Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 8 Apr 2019 10:05:20 +0200 Subject: [PATCH] path: reset sample length after simulation restart --- lib/path_source.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/path_source.cpp b/lib/path_source.cpp index 2279b0d11..d65649cfd 100644 --- a/lib/path_source.cpp +++ b/lib/path_source.cpp @@ -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);