named-data-ndnSIM / ndnSIM

ndnSIM: NS-3 based NDN simulator
GNU General Public License v3.0
108 stars 165 forks source link

Use a single source of truth for InFlight calculation #99

Open migrax opened 4 years ago

migrax commented 4 years ago

ndn-consumer-window and ndn-consumer-pcon use a simple count for updating the number of InFlight packets. This works fines as long as no packet arrives after its timeout has fired. In this case m_inFlight is decreased twice. Ultimately the counter (wrongly) reaches 0 and prevents proper working of the window algorithm.

This fix does away with the manual calculation of the counter and replaces it with the size of the m_seqTimeouts set.

Signed-off-by: Miguel Rodríguez Pérez miguel@det.uvigo.gal