From 1ad06afe9f952642a26f4d28239cf05eb3283eb7 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Tue, 19 Mar 2019 14:26:52 +0100 Subject: [HICN-6] ATS Working, little refactoring of apps Change-Id: I174815b70bf3a9fbe99ffab7dd2914be04d364b9 Signed-off-by: Mauro Sardara --- libtransport/src/hicn/transport/utils/content_store.cc | 2 +- libtransport/src/hicn/transport/utils/content_store.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'libtransport/src/hicn/transport/utils') 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 &ContentStore::find( +const std::shared_ptr ContentStore::find( const Interest &interest) { std::unique_lock 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 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 &content_object); - const std::shared_ptr &find(const Interest &interest); + const std::shared_ptr find(const Interest &interest); void erase(const Name &exact_name); -- cgit 1.2.3-korg