Return txDuration as 0 for ports with no streams
This commit is contained in:
parent
5e7bf77b0c
commit
fb879d2c72
@ -246,8 +246,10 @@ void PcapTxThread::run()
|
|||||||
TimeStamp startTime, endTime;
|
TimeStamp startTime, endTime;
|
||||||
|
|
||||||
qDebug("packetSequenceList_.size = %d", packetSequenceList_.size());
|
qDebug("packetSequenceList_.size = %d", packetSequenceList_.size());
|
||||||
if (packetSequenceList_.size() <= 0)
|
if (packetSequenceList_.size() <= 0) {
|
||||||
goto _exit;
|
lastTxDuration_ = 0.0;
|
||||||
|
goto _exit2;
|
||||||
|
}
|
||||||
|
|
||||||
for(i = 0; i < packetSequenceList_.size(); i++) {
|
for(i = 0; i < packetSequenceList_.size(); i++) {
|
||||||
qDebug("sendQ[%d]: rptCnt = %d, rptSz = %d, usecDelay = %ld", i,
|
qDebug("sendQ[%d]: rptCnt = %d, rptSz = %d, usecDelay = %ld", i,
|
||||||
@ -352,7 +354,10 @@ _restart:
|
|||||||
_exit:
|
_exit:
|
||||||
getTimeStamp(&endTime);
|
getTimeStamp(&endTime);
|
||||||
lastTxDuration_ = udiffTimeStamp(&startTime, &endTime)/1e6;
|
lastTxDuration_ = udiffTimeStamp(&startTime, &endTime)/1e6;
|
||||||
|
|
||||||
|
_exit2:
|
||||||
qDebug("Tx duration = %fs", lastTxDuration_);
|
qDebug("Tx duration = %fs", lastTxDuration_);
|
||||||
|
//Q_ASSERT(lastTxDuration_ >= 0);
|
||||||
|
|
||||||
if (trackStreamStats_)
|
if (trackStreamStats_)
|
||||||
updateStreamStats();
|
updateStreamStats();
|
||||||
|
Loading…
Reference in New Issue
Block a user