summaryrefslogtreecommitdiff
path: root/ecp/test/vc_server.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2024-05-14 23:09:36 +0200
committerUros Majstorovic <majstor@majstor.org>2024-05-14 23:09:36 +0200
commit6d50a8bff1938a8d7f398275a886aca37d6f6a7c (patch)
tree9a292e5c35b509bd0f4eda52d995ab37edf90590 /ecp/test/vc_server.c
parent5769607dabd338973110d0ecd51b3d61f5f305ff (diff)
tests improved logging; add dir client test
Diffstat (limited to 'ecp/test/vc_server.c')
-rw-r--r--ecp/test/vc_server.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ecp/test/vc_server.c b/ecp/test/vc_server.c
index b664a1c..a1a1c51 100644
--- a/ecp/test/vc_server.c
+++ b/ecp/test/vc_server.c
@@ -51,33 +51,33 @@ int main(int argc, char *argv[]) {
if ((argc < 4) || (argc > 7)) usage(argv[0]);
rv = ecp_init(&ctx, &vconn_handler, &vlink_handler);
- printf("ecp_init RV:%d\n", rv);
+ LOG("ecp_init", rv);
ecp_conn_handler_init(&handler, handle_open, NULL, handle_msg, NULL);
ecp_ctx_set_handler(&ctx, CTYPE_TEST, &handler);
rv = ecp_util_load_key(argv[1], &key_perma.public, &key_perma.private);
- printf("ecp_util_load_key RV:%d\n", rv);
+ LOG("ecp_util_load_key", rv);
key_perma.valid = 1;
rv = ecp_sock_create(&sock, &ctx, &key_perma);
- printf("ecp_sock_create RV:%d\n", rv);
+ LOG("ecp_sock_create", rv);
rv = ecp_vconn_sock_create(&sock);
- printf("ecp_vconn_htable_init RV:%d\n", rv);
+ LOG("ecp_vconn_htable_init", rv);
rv = ecp_sock_open(&sock, NULL);
- printf("ecp_sock_open RV:%d\n", rv);
+ LOG("ecp_sock_open", rv);
rv = ecp_start_receiver(&sock);
- printf("ecp_start_receiver RV:%d\n", rv);
+ LOG("ecp_start_receiver", rv);
rv = ecp_util_load_key(argv[argc-1], &node_pub, NULL);
- printf("ecp_util_load_key RV:%d\n", rv);
+ LOG("ecp_util_load_key", rv);
ecp_node_init(&node, &node_pub, NULL);
rv = ecp_node_set_addr(&node, argv[2]);
- printf("ecp_node_set_addr RV:%d\n", rv);
+ LOG("ecp_node_set_addr", rv);
ecp_vlink_init(&conn, &sock);
if (argc > 4) {
@@ -85,15 +85,15 @@ int main(int argc, char *argv[]) {
for (i=3; i<argc-1; i++) {
rv = ecp_util_load_key(argv[i], &vconn_pub[i-3], NULL);
- printf("ecp_util_load_key RV:%d\n", rv);
+ LOG("ecp_util_load_key", rv);
}
ecp_vconn_init(vconn, vconn_pub, argc-4, &sock);
rv = ecp_vconn_open(vconn, &conn, &node);
- printf("ecp_vconn_open RV:%d\n", rv);
+ LOG("ecp_vconn_open", rv);
} else {
rv = ecp_conn_open(&conn, &node);
- printf("ecp_conn_open RV:%d\n", rv);
+ LOG("ecp_conn_open", rv);
}
while (1) sleep(1);