diff options
author | Uros Majstorovic <majstor@majstor.org> | 2022-10-24 19:51:26 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2022-10-24 19:51:26 +0200 |
commit | b32bf58f111a1edb02c9f700e86cd2905fe7ed31 (patch) | |
tree | 4b011c0673d5956495803c009333d9a82c49ae61 /ecp/src | |
parent | 4e84ed5db3f5a1ffe70eea9502ff75f46cfb12fa (diff) |
fixed for no hash table
Diffstat (limited to 'ecp/src')
-rw-r--r-- | ecp/src/ecp/core.c | 2 | ||||
-rw-r--r-- | ecp/src/ecp/vconn/vconn.h | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/ecp/src/ecp/core.c b/ecp/src/ecp/core.c index 9585388..b491c0b 100644 --- a/ecp/src/ecp/core.c +++ b/ecp/src/ecp/core.c @@ -351,7 +351,7 @@ static ECPConnection *conn_table_search_addr_next(ECPSocket *sock, ecp_tr_addr_t f = 0; for (i=0; i<sock->conn_table.size; i++) { conn = sock->conn_table.arr[i]; - if (f) + if (f) { if (ecp_conn_is_root(conn) && ecp_conn_is_outb(conn) && ecp_tr_addr_eq(&conn->remote.addr, addr)) { return conn; } diff --git a/ecp/src/ecp/vconn/vconn.h b/ecp/src/ecp/vconn/vconn.h index 62275bf..9bdb3d3 100644 --- a/ecp/src/ecp/vconn/vconn.h +++ b/ecp/src/ecp/vconn/vconn.h @@ -5,6 +5,12 @@ #define ECP_MTYPE_EXEC 0x02 #define ECP_MTYPE_RELAY 0x01 +#ifndef ECP_WITH_HTABLE +#define ecp_vconn_handle_close NULL +#define ecp_vlink_handle_open NULL +#define ecp_vlink_handle_close NULL +#endif + typedef struct ECPVConnInb { ECPConnection b; ECPConnection *next; @@ -24,8 +30,8 @@ void ecp_vconn_init(ECPVConnOutb vconn[], ecp_ecdh_public_t keys[], size_t vconn void ecp_vconn_init_inb(ECPVConnInb *vconn, ECPSocket *sock); #endif int ecp_vconn_open(ECPVConnOutb *vconn, ECPConnection *conn, ECPNode *node); -#ifdef ECP_WITH_HTABLE int ecp_vconn_handle_open(ECPConnection *conn, ECP2Buffer *bufs); +#ifdef ECP_WITH_HTABLE void ecp_vconn_handle_close(ECPConnection *conn); #endif ssize_t ecp_vconn_handle_msg(ECPConnection *conn, ecp_seq_t seq, unsigned char mtype, unsigned char *msg, size_t msg_size, ECP2Buffer *bufs); |