Skip to content

Commit

Permalink
FlowMeasurementRecorder: Make sure that the path exists for the outpu…
Browse files Browse the repository at this point in the history
…t file.
  • Loading branch information
levy committed Jan 5, 2024
1 parent 20056c3 commit 3a44054
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/inet/queueing/flow/FlowMeasurementRecorder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "inet/queueing/flow/FlowMeasurementRecorder.h"

#include "inet/common/FlowTag.h"
#include "inet/common/INETUtils.h"
#include "inet/common/PacketEventTag.h"

namespace inet {
Expand Down Expand Up @@ -62,7 +63,9 @@ void FlowMeasurementRecorder::initialize(int stage)
measurePropagationTime = matchesString(measureMatcher, "propagationTime");
measurePacketEvent = matchesString(measureMatcher, "packetEvent");
if (measurePacketEvent) {
packetEventFile.open(par("packetEventFileName").stringValue(), std::ios::out);
const char *fileName = par("packetEventFileName");
inet::utils::makePathForFile(fileName);
packetEventFile.open(fileName, std::ios::out);
packetEventFile.openArray();
}
}
Expand Down

0 comments on commit 3a44054

Please sign in to comment.