summaryrefslogtreecommitdiff
path: root/libftpconn
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-08-09 23:43:57 +0000
committerMiles Bader <miles@gnu.org>1997-08-09 23:43:57 +0000
commitf3866ded4b952c48a02ee5a98d019a075a78ea34 (patch)
tree0638d094fadf677b466e66d1b9870997c79d0903 /libftpconn
parentb540328a44ada1a8612957e6bba74ea31345f77a (diff)
(ftp_conn_cont_get_names):
Check for interrupts.
Diffstat (limited to 'libftpconn')
-rw-r--r--libftpconn/names.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libftpconn/names.c b/libftpconn/names.c
index 7b0e3977..4536b723 100644
--- a/libftpconn/names.c
+++ b/libftpconn/names.c
@@ -78,6 +78,7 @@ ftp_conn_cont_get_names (struct ftp_conn *conn, int fd, void *state,
size_t name_len;
error_t err = 0;
struct get_names_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. */
@@ -88,6 +89,12 @@ ftp_conn_cont_get_names (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)