From 37fa8fc50753900f536e7ce857a63ac557e572ba Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sun, 13 Aug 2017 00:54:43 +0200 Subject: var rename --- code/test/vc_client.c | 2 +- code/vconn/vconn.c | 40 ++++++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/code/test/vc_client.c b/code/test/vc_client.c index 586fec5..8f4b084 100644 --- a/code/test/vc_client.c +++ b/code/test/vc_client.c @@ -47,7 +47,7 @@ ssize_t handle_msg(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned } static void usage(char *arg) { - fprintf(stderr, "Usage: %s ... \n", arg); + fprintf(stderr, "Usage: %s ... \n", arg); exit(1); } diff --git a/code/vconn/vconn.c b/code/vconn/vconn.c index 97ced70..3a69092 100644 --- a/code/vconn/vconn.c +++ b/code/vconn/vconn.c @@ -13,8 +13,8 @@ static void *key_next_table; static unsigned char key_null[ECP_ECDH_SIZE_KEY] = { 0 }; -static ECPConnHandler handler_f; -static ECPConnHandler handler_b; +static ECPConnHandler handler_vc; +static ECPConnHandler handler_vl; static int vconn_create(ECPConnection *conn, unsigned char *payload, size_t size) { ECPContext *ctx = conn->sock->ctx; @@ -444,28 +444,28 @@ static ssize_t vconn_pack_raw(ECPSocket *sock, ECPConnection *parent, unsigned c int ecp_ctx_vconn_init(ECPContext *ctx) { int rv; - rv = ecp_conn_handler_init(&handler_f); + rv = ecp_conn_handler_init(&handler_vc); if (rv) return rv; - handler_f.conn_create = vconn_create; - handler_f.conn_destroy = vconn_destroy; - handler_f.conn_open = vconn_open; - handler_f.msg[ECP_MTYPE_OPEN] = vconn_handle_open; - handler_f.msg[ECP_MTYPE_EXEC] = ecp_conn_handle_exec; - handler_f.msg[ECP_MTYPE_RELAY] = vconn_handle_relay; - ctx->handler[ECP_CTYPE_VCONN] = &handler_f; - - rv = ecp_conn_handler_init(&handler_b); + handler_vc.conn_create = vconn_create; + handler_vc.conn_destroy = vconn_destroy; + handler_vc.conn_open = vconn_open; + handler_vc.msg[ECP_MTYPE_OPEN] = vconn_handle_open; + handler_vc.msg[ECP_MTYPE_EXEC] = ecp_conn_handle_exec; + handler_vc.msg[ECP_MTYPE_RELAY] = vconn_handle_relay; + ctx->handler[ECP_CTYPE_VCONN] = &handler_vc; + + rv = ecp_conn_handler_init(&handler_vl); if (rv) return rv; - handler_b.conn_create = vlink_create; - handler_b.conn_destroy = vlink_destroy; - handler_b.conn_open = vlink_open; - handler_b.conn_close = vlink_close; - handler_b.msg[ECP_MTYPE_OPEN] = vlink_handle_open; - handler_b.msg[ECP_MTYPE_EXEC] = ecp_conn_handle_exec; - handler_b.msg[ECP_MTYPE_RELAY] = vlink_handle_relay; - ctx->handler[ECP_CTYPE_VLINK] = &handler_b; + handler_vl.conn_create = vlink_create; + handler_vl.conn_destroy = vlink_destroy; + handler_vl.conn_open = vlink_open; + handler_vl.conn_close = vlink_close; + handler_vl.msg[ECP_MTYPE_OPEN] = vlink_handle_open; + handler_vl.msg[ECP_MTYPE_EXEC] = ecp_conn_handle_exec; + handler_vl.msg[ECP_MTYPE_RELAY] = vlink_handle_relay; + ctx->handler[ECP_CTYPE_VLINK] = &handler_vl; ctx->pack = vconn_pack; ctx->pack_raw = vconn_pack_raw; -- cgit v1.2.3