From d9e41fe065d0929d9ff50ad9b86babbd4f7dcfb2 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Mon, 17 Nov 2014 21:00:49 +0000 Subject: [PATCH] Remove dead code. --- client/client_shared.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/client/client_shared.c b/client/client_shared.c index 7c41d825..c2ac6476 100644 --- a/client/client_shared.c +++ b/client/client_shared.c @@ -877,19 +877,12 @@ static int mosquitto__parse_socks_url(struct mosq_config *cfg, char *url) port[len] = '\0'; }else if(username_or_host){ /* Haven't seen a @ before, so must be of form - * socks5h://host:port or - * socks5h://username:password@host[:port] */ - if(have_auth){ - host = malloc(len + 1); - memcpy(host, &(str[start]), len); - host[len] = '\0'; - }else{ - host = username_or_host; - username_or_host = NULL; - port = malloc(len + 1); - memcpy(port, &(str[start]), len); - port[len] = '\0'; - } + * socks5h://host:port */ + host = username_or_host; + username_or_host = NULL; + port = malloc(len + 1); + memcpy(port, &(str[start]), len); + port[len] = '\0'; }else{ host = malloc(len + 1); memcpy(host, &(str[start]), len);