diff options
Diffstat (limited to 'hicn-light/src/hicn/core/listener_table.h')
-rw-r--r-- | hicn-light/src/hicn/core/listener_table.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hicn-light/src/hicn/core/listener_table.h b/hicn-light/src/hicn/core/listener_table.h index 91b68ee94..3d21cc88f 100644 --- a/hicn-light/src/hicn/core/listener_table.h +++ b/hicn-light/src/hicn/core/listener_table.h @@ -40,8 +40,8 @@ #define _lt_var(x) _lt_var_##x /* Hash functions for indices */ -#define key_hash(key) (hash(key, sizeof(listener_key_t))) -#define key_hash_eq(a, b) (key_hash(b) - key_hash(a)) +#define key_hash(key) (hash_struct(key)) +#define key_hash_eq(a, b) (key_hash(b) == key_hash(a)) /* Hash table types for indices */ KHASH_MAP_INIT_STR(lt_name, unsigned); @@ -72,7 +72,7 @@ typedef struct { */ #define listener_table_allocate(TABLE, LISTENER, KEY, NAME) \ do { \ - pool_get(table->listeners, (LISTENER)); \ + pool_get(TABLE->listeners, (LISTENER)); \ if (LISTENER) { \ off_t _lt_var(id) = (LISTENER) - (TABLE)->listeners; \ int _lt_var(res); \ |