From 7532a1d576b1784716002f79ef72b24a01f81b03 Mon Sep 17 00:00:00 2001 From: "Srivats P." Date: Fri, 8 Apr 2011 23:39:20 +0530 Subject: [PATCH] Fixed crash in drone when inter packet/burst gap > 1 sec. --- server/abstractport.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/abstractport.cpp b/server/abstractport.cpp index 63db109..cd16732 100644 --- a/server/abstractport.cpp +++ b/server/abstractport.cpp @@ -129,21 +129,21 @@ void AbstractPort::updatePacketList() if (streamList_[i]->isEnabled()) { long numPackets, numBursts; - long ibg, ipg; + long ibg = 0, ipg = 0; switch (streamList_[i]->sendUnit()) { case OstProto::StreamControl::e_su_bursts: numBursts = streamList_[i]->numBursts(); numPackets = streamList_[i]->burstSize(); - ibg = 1000000/streamList_[i]->burstRate(); - ipg = 0; + if (streamList_[i]->burstRate() > 0) + ibg = 1000000/streamList_[i]->burstRate(); break; case OstProto::StreamControl::e_su_packets: numBursts = 1; numPackets = streamList_[i]->numPackets(); - ibg = 0; - ipg = 1000000/streamList_[i]->packetRate(); + if (streamList_[i]->packetRate() > 0) + ipg = 1000000/streamList_[i]->packetRate(); break; default: qWarning("Unhandled stream control unit %d",