summaryrefslogtreecommitdiff
path: root/libftpconn
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-08-09 23:44:27 +0000
committerMiles Bader <miles@gnu.org>1997-08-09 23:44:27 +0000
commit784ac5d3dd717c5ce317b1856a1f2ae98fdef902 (patch)
tree27d89e5043fa08a3f673422b592a550ea33f9be5 /libftpconn
parent4036ef0968a055c25c1f092be5047c488065306e (diff)
(ftp_conn_unix_cont_get_stats):
Check for interrupts.
Diffstat (limited to 'libftpconn')
-rw-r--r--libftpconn/unix.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libftpconn/unix.c b/libftpconn/unix.c
index 9ba326f0..b7a79cab 100644
--- a/libftpconn/unix.c
+++ b/libftpconn/unix.c
@@ -486,6 +486,7 @@ ftp_conn_unix_cont_get_stats (struct ftp_conn *conn, int fd, void *state,
size_t name_len;
error_t err = 0;
struct get_stats_state *s = state;
+ int (*icheck) (struct ftp_conn *conn) = conn->hooks->interrupt_check;
/* We always consume full lines, so we know that we have to read more when
we first get called. */
@@ -496,6 +497,12 @@ ftp_conn_unix_cont_get_stats (struct ftp_conn *conn, int fd, void *state,
goto finished;
}
+ if (icheck && (*icheck) (conn))
+ {
+ err = EINTR;
+ goto finished;
+ }
+
if (rd == 0)
/* EOF */
if (s->buf_len == 0)