diff --git a/vfs/ChangeLog b/vfs/ChangeLog index f8b09a8c2..3ea1620c7 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,8 @@ +2006-02-05 Arpie + + * ftpfs.c (ftpfs_open_socket): Let the user interrupt ftpfs in + hostname lookup / connection state. + 2006-02-03 Roland Illig * fish.c: Replaced the printf-like attribute with __printf__, diff --git a/vfs/ftpfs.c b/vfs/ftpfs.c index cd80e6931..30657103e 100644 --- a/vfs/ftpfs.c +++ b/vfs/ftpfs.c @@ -662,6 +662,8 @@ ftpfs_open_socket (struct vfs_class *me, struct vfs_s_super *super) ftpfs_get_proxy_host_and_port (ftpfs_proxy_host, &host, &port); free_host = 1; } + + enable_interrupt_key(); /* clear the interrupt flag */ /* Get host address */ memset ((char *) &server_address, 0, sizeof (server_address)); @@ -670,6 +672,7 @@ ftpfs_open_socket (struct vfs_class *me, struct vfs_s_super *super) if (server_address.sin_addr.s_addr == INADDR_NONE) { hp = gethostbyname (host); if (hp == NULL){ + disable_interrupt_key(); print_vfs_message (_("ftpfs: Invalid host address.")); ftpfs_errno = EINVAL; if (free_host) @@ -686,6 +689,7 @@ ftpfs_open_socket (struct vfs_class *me, struct vfs_s_super *super) /* Connect */ if ((my_socket = socket (AF_INET, SOCK_STREAM, 0)) < 0) { + disable_interrupt_key(); ftpfs_errno = errno; if (free_host) g_free (host); @@ -696,8 +700,6 @@ ftpfs_open_socket (struct vfs_class *me, struct vfs_s_super *super) if (free_host) g_free (host); - enable_interrupt_key (); /* clear the interrupt flag */ - if (connect (my_socket, (struct sockaddr *) &server_address, sizeof (server_address)) < 0){ ftpfs_errno = errno;