From a4f22127be441c4c158c10fe65916872d99253d2 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Wed, 19 Jan 2022 02:49:47 +0100 Subject: code cleanup --- ecp/test/dir.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'ecp/test/dir.c') diff --git a/ecp/test/dir.c b/ecp/test/dir.c index 413cd03..0c2ac72 100644 --- a/ecp/test/dir.c +++ b/ecp/test/dir.c @@ -5,6 +5,7 @@ #include "core.h" #include "cr.h" #include "dir.h" +#include "dir_srv.h" ECPContext ctx_s; ECPSocket sock_s; @@ -51,8 +52,8 @@ int main(int argc, char *argv[]) { rv = ecp_dhkey_gen(&ctx_s, &key_perma_s); printf("ecp_dhkey_gen RV:%d\n", rv); - rv = ecp_sock_create(&sock_s, &ctx_s, &key_perma_s); - printf("ecp_sock_create RV:%d\n", rv); + rv = ecp_sock_init(&sock_s, &ctx_s, &key_perma_s); + printf("ecp_sock_init RV:%d\n", rv); rv = ecp_sock_open(&sock_s, "0.0.0.0:3000"); printf("ecp_sock_open RV:%d\n", rv); @@ -70,8 +71,8 @@ int main(int argc, char *argv[]) { rv = ecp_dhkey_gen(&ctx_c, &key_perma_c); printf("ecp_dhkey_gen RV:%d\n", rv); - rv = ecp_sock_create(&sock_c, &ctx_c, &key_perma_c); - printf("ecp_sock_create RV:%d\n", rv); + rv = ecp_sock_init(&sock_c, &ctx_c, &key_perma_c); + printf("ecp_sock_init RV:%d\n", rv); rv = ecp_sock_open(&sock_c, NULL); printf("ecp_sock_open RV:%d\n", rv); @@ -82,8 +83,8 @@ int main(int argc, char *argv[]) { rv = ecp_node_init(&node, &key_perma_s.public, "127.0.0.1:3000"); printf("ecp_node_init RV:%d\n", rv); - rv = ecp_conn_create(&conn, &sock_c, CTYPE_TEST); - printf("ecp_conn_create RV:%d\n", rv); + rv = ecp_conn_init(&conn, &sock_c, CTYPE_TEST); + printf("ecp_conn_init RV:%d\n", rv); rv = ecp_conn_get_dirlist(&conn, &node); printf("ecp_conn_get_dirlist RV:%d\n", rv); -- cgit v1.2.3