Fixed errors while connect to IPv6 hosts

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2011-07-05 16:05:15 +03:00
parent 2044d8f853
commit 0f249bd9b5
2 changed files with 6 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -29,6 +29,7 @@ typedef struct
char *user;
char *password;
char *host;
gboolean ipv6;
int port;
char *path;
struct vfs_class *class;