summaryrefslogtreecommitdiff
path: root/ecp/test/init_vconn.c
diff options
context:
space:
mode:
Diffstat (limited to 'ecp/test/init_vconn.c')
-rw-r--r--ecp/test/init_vconn.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ecp/test/init_vconn.c b/ecp/test/init_vconn.c
index 7594c92..3393a16 100644
--- a/ecp/test/init_vconn.c
+++ b/ecp/test/init_vconn.c
@@ -13,6 +13,7 @@ static ECPConnection *conn_new(ECPSocket *sock, ECPConnection *parent, unsigned
ECPConnection *conn = NULL;
switch (type) {
+#ifdef ECP_WITH_HTABLE
case ECP_CTYPE_VCONN: {
ECPVConnInb *_conn;
@@ -23,6 +24,7 @@ static ECPConnection *conn_new(ECPSocket *sock, ECPConnection *parent, unsigned
}
break;
}
+#endif
case ECP_CTYPE_VLINK: {
conn = malloc(sizeof(ECPConnection));
@@ -42,7 +44,8 @@ static ECPConnection *conn_new(ECPSocket *sock, ECPConnection *parent, unsigned
}
static void conn_free(ECPConnection *conn) {
- if (ecp_conn_is_gc(conn)) free(conn);
+ /* outbound connections are statically allocated */
+ if (ecp_conn_is_inb(conn)) free(conn);
}
int ecp_init(ECPContext *ctx, ECPConnHandler *vconn_handler, ECPConnHandler *vlink_handler) {