From 5f55d9d4d14635678e7f582215e3642de2e232a4 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Mon, 6 May 2024 02:08:31 +0200 Subject: new ecp directory and vconn server --- ecp/server/ht.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'ecp/server/ht.c') diff --git a/ecp/server/ht.c b/ecp/server/ht.c index 0daf8d5..dc67d30 100644 --- a/ecp/server/ht.c +++ b/ecp/server/ht.c @@ -1,34 +1,25 @@ #include -#include #include #include "dir.h" #include "ht.h" -int ht_insert_node(ecp_ht_table_t *table, DirNode *node) { - return ecp_ht_insert(table, &node->dir_item.node.key_perma.public, node); +int ht_insert_node(ecp_ht_table_t *table, DIRNode *node) { + return ecp_ht_insert_uniq(table, &node->dir_item.node.key_perma.public, node); } -void ht_remove_node(ecp_ht_table_t *table, DirNode *node) { +void ht_remove_node(ecp_ht_table_t *table, DIRNode *node) { ecp_ht_remove(table, &node->dir_item.node.key_perma.public); } -void *ht_search_node(ecp_ht_table_t *table, DirNode *node) { - return ecp_ht_search(table, &node->dir_item.node.key_perma.public); +void *ht_search_item(ecp_ht_table_t *table, ECPDirItem *dir_item) { + return ecp_ht_search(table, &dir_item->node.key_perma.public); } int ht_insert_conn(ecp_ht_table_t *table, ECPConnection *conn) { - return ecp_ht_insert(table, &conn->remote.key_perma.public, conn); + return ecp_ht_insert_uniq(table, &conn->remote.key_perma.public, conn); } void ht_remove_conn(ecp_ht_table_t *table, ECPConnection *conn) { ecp_ht_remove(table, &conn->remote.key_perma.public); } - -void *ht_search_conn(ecp_ht_table_t *table, ECPConnection *conn) { - return ecp_ht_search(table, &conn->remote.key_perma.public); -} - -void *ht_search_item(ecp_ht_table_t *table, ECPDirItem *dir_item) { - return ecp_ht_search(table, &dir_item->node.key_perma.public); -} -- cgit v1.2.3