aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/hicn/transport/utils
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2019-03-19 14:26:52 +0100
committerMauro Sardara <msardara@cisco.com>2019-03-23 15:05:53 +0100
commit1ad06afe9f952642a26f4d28239cf05eb3283eb7 (patch)
tree1ea58529d64a38597cd09f78653cc784c4b61d79 /libtransport/src/hicn/transport/utils
parente6d4612011483b267dc9f47c5d2b2444dd88f402 (diff)
[HICN-6] ATS Working, little refactoring of apps
Change-Id: I174815b70bf3a9fbe99ffab7dd2914be04d364b9 Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'libtransport/src/hicn/transport/utils')
-rw-r--r--libtransport/src/hicn/transport/utils/content_store.cc2
-rw-r--r--libtransport/src/hicn/transport/utils/content_store.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/libtransport/src/hicn/transport/utils/content_store.cc b/libtransport/src/hicn/transport/utils/content_store.cc
index d48e16daf..c3864310e 100644
--- a/libtransport/src/hicn/transport/utils/content_store.cc
+++ b/libtransport/src/hicn/transport/utils/content_store.cc
@@ -62,7 +62,7 @@ void ContentStore::insert(
}
}
-const std::shared_ptr<ContentObject> &ContentStore::find(
+const std::shared_ptr<ContentObject> ContentStore::find(
const Interest &interest) {
std::unique_lock<std::mutex> lock(cs_mutex_);
auto it = content_store_hash_table_.find(interest.getName());
diff --git a/libtransport/src/hicn/transport/utils/content_store.h b/libtransport/src/hicn/transport/utils/content_store.h
index 39e87fb7d..ba8ee5bd2 100644
--- a/libtransport/src/hicn/transport/utils/content_store.h
+++ b/libtransport/src/hicn/transport/utils/content_store.h
@@ -46,13 +46,13 @@ typedef std::unordered_map<Name, ContentStoreEntry> ContentStoreHashTable;
class ContentStore {
public:
- explicit ContentStore(std::size_t max_packets = 65536);
+ explicit ContentStore(std::size_t max_packets = (1 << 16));
~ContentStore();
void insert(const std::shared_ptr<ContentObject> &content_object);
- const std::shared_ptr<ContentObject> &find(const Interest &interest);
+ const std::shared_ptr<ContentObject> find(const Interest &interest);
void erase(const Name &exact_name);