chunks: code cleanups
* Introduce getSegmentFromPacket() helper function
* Use signed arithmetic for some quantities to avoid conversion issues
* Move start time handling to PipelineInterests base class
Change-Id: I275acac1ad93e4a72374d03fad0a1d7348d70976
diff --git a/tools/chunks/catchunks/consumer.cpp b/tools/chunks/catchunks/consumer.cpp
index 6ecd630..306cc16 100644
--- a/tools/chunks/catchunks/consumer.cpp
+++ b/tools/chunks/catchunks/consumer.cpp
@@ -1,8 +1,8 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2016, Regents of the University of California,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University.
+ * Copyright (c) 2016-2017, Regents of the University of California,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -82,7 +82,7 @@
throw ApplicationNackError(*data);
}
- m_bufferedData[data->getName()[-1].toSegment()] = data;
+ m_bufferedData[getSegmentFromPacket(*data)] = data;
writeInOrderData();
}