From 4036ef0968a055c25c1f092be5047c488065306e Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 9 Aug 1997 23:44:14 +0000 Subject: (ftp_conn_getline): Check for interrupts. --- libftpconn/reply.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libftpconn') diff --git a/libftpconn/reply.c b/libftpconn/reply.c index 260cfb71..4f30f751 100644 --- a/libftpconn/reply.c +++ b/libftpconn/reply.c @@ -60,6 +60,7 @@ ftp_conn_getline (struct ftp_conn *conn, const char **line, size_t *line_len) { char *l = conn->line; size_t offs = conn->line_offs, len = conn->line_len, sz = conn->line_sz; + int (*icheck) (struct ftp_conn *conn) = conn->hooks->interrupt_check; for (;;) { @@ -127,6 +128,9 @@ ftp_conn_getline (struct ftp_conn *conn, const char **line, size_t *line_len) len += rd; conn->line_len = len; + + if (icheck && (*icheck) (conn)) + return EINTR; } } -- cgit v1.2.3