mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-27 22:29:31 +08:00
Remove dead code.
This commit is contained in:
+6
-13
@@ -877,19 +877,12 @@ static int mosquitto__parse_socks_url(struct mosq_config *cfg, char *url)
|
|||||||
port[len] = '\0';
|
port[len] = '\0';
|
||||||
}else if(username_or_host){
|
}else if(username_or_host){
|
||||||
/* Haven't seen a @ before, so must be of form
|
/* Haven't seen a @ before, so must be of form
|
||||||
* socks5h://host:port or
|
* socks5h://host:port */
|
||||||
* socks5h://username:password@host[:port] */
|
host = username_or_host;
|
||||||
if(have_auth){
|
username_or_host = NULL;
|
||||||
host = malloc(len + 1);
|
port = malloc(len + 1);
|
||||||
memcpy(host, &(str[start]), len);
|
memcpy(port, &(str[start]), len);
|
||||||
host[len] = '\0';
|
port[len] = '\0';
|
||||||
}else{
|
|
||||||
host = username_or_host;
|
|
||||||
username_or_host = NULL;
|
|
||||||
port = malloc(len + 1);
|
|
||||||
memcpy(port, &(str[start]), len);
|
|
||||||
port[len] = '\0';
|
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
host = malloc(len + 1);
|
host = malloc(len + 1);
|
||||||
memcpy(host, &(str[start]), len);
|
memcpy(host, &(str[start]), len);
|
||||||
|
|||||||
Reference in New Issue
Block a user