From: Martin Quinson Date: Tue, 25 Dec 2018 16:27:19 +0000 (+0100) Subject: ns3: assert that the sent amount is as expected X-Git-Tag: v3_22~764 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1ae9ed663c9bf5f3fd71309249a91fbdad810dea?hp=7004e652c432f96df3cb03fea606a7c026af9c49 ns3: assert that the sent amount is as expected --- diff --git a/src/surf/ns3/ns3_simulator.cpp b/src/surf/ns3/ns3_simulator.cpp index 1ee844733c..1c13b30bca 100644 --- a/src/surf/ns3/ns3_simulator.cpp +++ b/src/surf/ns3/ns3_simulator.cpp @@ -91,6 +91,8 @@ static void normalClose_callback(ns3::Ptr socket) { SgFlow* flow = getFlowFromSocket(socket); XBT_DEBUG("normalClose_cb of F[%p, %p, %u]", flow, flow->action_, flow->total_bytes_); + xbt_assert(flow->total_bytes_ == flow->sent_bytes_); + xbt_assert(flow->remaining_ == 0); receive_callback(socket); }