(ftpfs_open_data_connection): fix enable/disable interrupt key.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2016-08-09 14:58:13 +03:00
parent ba20fac1b3
commit 01428beb2a

View File

@ -1401,21 +1401,20 @@ ftpfs_open_data_connection (struct vfs_class *me, struct vfs_s_super *super, con
close (s);
ERRNOR (EPERM, -1);
}
tty_enable_interrupt_key ();
if (SUP->use_passive_connection)
data = s;
else
{
tty_enable_interrupt_key ();
data = accept (s, (struct sockaddr *) &from, &fromlen);
if (data < 0)
{
ftpfs_errno = errno;
close (s);
return -1;
}
tty_disable_interrupt_key ();
close (s);
if (data < 0)
return -1;
}
tty_disable_interrupt_key ();
SUP->ctl_connection_busy = 1;
return data;
}