X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=src%2Ftlsproxy.c;h=39183a7753d78742bca861408ae223a3bfe6f639;hb=a5daed1d9eef83ac47d8700c45bf919c113b39dd;hp=033e5ba2e6af31dc2b21ede5e83efad72502f659;hpb=04a443914e05704e6fcf58b738dcde5f75ce6a97;p=tlsproxy%2Ftlsproxy.git diff --git a/src/tlsproxy.c b/src/tlsproxy.c index 033e5ba..39183a7 100644 --- a/src/tlsproxy.c +++ b/src/tlsproxy.c @@ -155,8 +155,8 @@ int main(int argc, char **argv) { #ifdef DEBUG printf("Listening for connections on port %d.\n", port); - if (NULL != use_proxy_host && NULL != use_proxy_port) { - printf("Using proxy: %s:%s.\n", use_proxy_host, use_proxy_port); + if (NULL != global_proxy_host && NULL != global_proxy_port) { + printf("Using proxy: %s:%s.\n", global_proxy_host, global_proxy_port); } #endif @@ -198,8 +198,8 @@ int main(int argc, char **argv) { free(threads); - free(use_proxy_host); - free(use_proxy_port); + free(global_proxy_host); + free(global_proxy_port); return EXIT_FAILURE; } @@ -232,20 +232,20 @@ static void parse_arguments(int argc, char **argv) { exit(EXIT_FAILURE); } - use_proxy_host = malloc((size_t)(position - optarg) + 1); - if (NULL == use_proxy_host) { + global_proxy_host = malloc((size_t)(position - optarg) + 1); + if (NULL == global_proxy_host) { perror("malloc()"); exit(EXIT_FAILURE); } - memcpy(use_proxy_host, optarg, (size_t)(position - optarg)); - use_proxy_host[position - optarg] = '\0'; + memcpy(global_proxy_host, optarg, (size_t)(position - optarg)); + global_proxy_host[position - optarg] = '\0'; - use_proxy_port = malloc(strlen(position + 1) + 1); - if (NULL == use_proxy_port) { + global_proxy_port = malloc(strlen(position + 1) + 1); + if (NULL == global_proxy_port) { perror("malloc()"); exit(EXIT_FAILURE); } - strcpy(use_proxy_port, position + 1); + strcpy(global_proxy_port, position + 1); break; }