aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/hicn/core/content_store.h
diff options
context:
space:
mode:
authorEnrico Loparco (eloparco) <eloparco@cisco.com>2021-06-18 14:32:44 +0200
committerEnrico Loparco (eloparco) <eloparco@cisco.com>2021-06-24 09:31:04 +0200
commit05bcac416bcddaf05bd0437bd27a19933502baf2 (patch)
treeb34ef95bf3dffc27eabda12e055933703b9017bb /hicn-light/src/hicn/core/content_store.h
parent4c5b811c7d105aafb847f9006fd1e5235206e5cd (diff)
[HICN-709] Fix bugs in listener and connection tables and add unit tests
Signed-off-by: Enrico Loparco (eloparco) <eloparco@cisco.com> Change-Id: Idf86a3c6a1dd50d29c1a245a00352a553a5fdb42
Diffstat (limited to 'hicn-light/src/hicn/core/content_store.h')
-rw-r--r--hicn-light/src/hicn/core/content_store.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/hicn-light/src/hicn/core/content_store.h b/hicn-light/src/hicn/core/content_store.h
index 95b0a1d0a..754796d31 100644
--- a/hicn-light/src/hicn/core/content_store.h
+++ b/hicn-light/src/hicn/core/content_store.h
@@ -42,9 +42,9 @@ typedef struct {
// XXX TODO
#define name_hash(name) (name_HashCode(name))
-#define name_hash_eq(a, b) (name_hash(b) - name_hash(a))
+#define name_hash_eq(a, b) (name_hash(b) == name_hash(a))
-KHASH_INIT(cs_name, const Name *, unsigned, 0, name_hash, name_hash_eq);
+KHASH_INIT(cs_name, const Name *, unsigned, 1, name_hash, name_hash_eq);
typedef struct {
cs_type_t type;