mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Fixed errors while connect to IPv6 hosts
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
2044d8f853
commit
0f249bd9b5
@ -193,7 +193,11 @@ vfs_path_build_url_params_str (vfs_path_element_t * element)
|
||||
{
|
||||
if ((element->user != NULL) || (element->password != NULL))
|
||||
g_string_append_c (buffer, '@');
|
||||
if (element->ipv6)
|
||||
g_string_append_c (buffer, '[');
|
||||
g_string_append (buffer, element->host);
|
||||
if (element->ipv6)
|
||||
g_string_append_c (buffer, ']');
|
||||
}
|
||||
|
||||
if ((element->port) != 0 && (element->host != NULL))
|
||||
@ -314,6 +318,7 @@ vfs_path_url_split (vfs_path_element_t * path_element, const char *path)
|
||||
colon[0] = '\0';
|
||||
colon[1] = '\0';
|
||||
colon++;
|
||||
path_element->ipv6 = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,7 @@ typedef struct
|
||||
char *user;
|
||||
char *password;
|
||||
char *host;
|
||||
gboolean ipv6;
|
||||
int port;
|
||||
char *path;
|
||||
struct vfs_class *class;
|
||||
|
Loading…
Reference in New Issue
Block a user