commit 8ddb663d2dc49da7764e2bac1296dfd2da3e79ca
parent 6526b642ade689360bcd47bb17be3fb5b3aa43b0
Author: Nihal Jere <nihal@nihaljere.xyz>
Date: Tue, 28 Jul 2020 12:26:00 -0500
renamed tls_client to toclient to clarify meaning and prevent naming
conflict
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tlsrp.c b/tlsrp.c
@@ -193,7 +193,7 @@ main(int argc, char* argv[])
int serverfd = 0, clientfd = 0, bindfd = 0;
struct sockaddr_storage client_sa = {0};
struct tls_config *config;
- struct tls *tls_client, *conn;
+ struct tls *toclient, *conn;
socklen_t client_sa_len = 0;
char *usock = NULL,
*backhost = NULL,
@@ -261,11 +261,11 @@ main(int argc, char* argv[])
if (tls_config_set_key_file(config, key_path) == -1)
tcdie(config, "failed to load key file:");
- if ((tls_client = tls_server()) == NULL)
+ if ((toclient = tls_server()) == NULL)
die("failed to create server context");
- if ((tls_configure(tls_client, config)) == -1)
- tdie(tls_client, "failed to configure server:");
+ if ((tls_configure(toclient, config)) == -1)
+ tdie(toclient, "failed to configure server:");
tls_config_free(config);
@@ -293,8 +293,8 @@ main(int argc, char* argv[])
else
serverfd = donetworkconnect(backhost, backport);
- if (tls_accept_socket(tls_client, &conn, clientfd) == -1) {
- warn("tls_accept_socket: %s", tls_error(tls_client));
+ if (tls_accept_socket(toclient, &conn, clientfd) == -1) {
+ warn("tls_accept_socket: %s", tls_error(toclient));
goto tlsfail;
}