Skip to content

Commit 3a44054

Browse files
committed
FlowMeasurementRecorder: Make sure that the path exists for the output file.
1 parent 20056c3 commit 3a44054

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/inet/queueing/flow/FlowMeasurementRecorder.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "inet/queueing/flow/FlowMeasurementRecorder.h"
99

1010
#include "inet/common/FlowTag.h"
11+
#include "inet/common/INETUtils.h"
1112
#include "inet/common/PacketEventTag.h"
1213

1314
namespace inet {
@@ -62,7 +63,9 @@ void FlowMeasurementRecorder::initialize(int stage)
6263
measurePropagationTime = matchesString(measureMatcher, "propagationTime");
6364
measurePacketEvent = matchesString(measureMatcher, "packetEvent");
6465
if (measurePacketEvent) {
65-
packetEventFile.open(par("packetEventFileName").stringValue(), std::ios::out);
66+
const char *fileName = par("packetEventFileName");
67+
inet::utils::makePathForFile(fileName);
68+
packetEventFile.open(fileName, std::ios::out);
6669
packetEventFile.openArray();
6770
}
6871
}

0 commit comments

Comments
 (0)