Set numPackets for imported streams to 1

Earlier the default value for num_packets was 1 and the imported streams
therefore also had the same. However, when the default value got changed
to 10, the num_packets for imported streams should have been explicitly
set to 1 - this was missed out and has been fixed now
This commit is contained in:
Srivats P 2018-10-04 18:07:50 +05:30
parent 495b99beda
commit 6cac41ab40
2 changed files with 4 additions and 0 deletions

View File

@ -438,6 +438,8 @@ _non_pdml:
stream->mutable_core()->set_is_enabled(true);
stream->mutable_core()->set_frame_len(pktHdr.inclLen+4); // FCS
stream->mutable_control()->set_num_packets(1);
// setup packet rate to the timing in pcap (as close as possible)
const uint kUsecsInSec = uint(1e6);
uint usec = (pktHdr.tsSec*kUsecsInSec + pktHdr.tsUsec);

View File

@ -192,4 +192,6 @@ void PdmlFrameProtocol::unknownFieldHandler(QString name, int /*pos*/,
}
}
}
else if (name == "frame.number")
stream->mutable_control()->set_num_packets(1);
}