From b17a3d64373453517fbfb278cb5439fe92755cde Mon Sep 17 00:00:00 2001 From: "Roy T. Fielding" Date: Tue, 20 Jun 2000 04:22:39 +0000 Subject: [PATCH] Removed the pointless ap_is_aborted macro. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85626 13f79535-47bb-0310-9956-ffa450edef68 --- include/httpd.h | 2 -- modules/http/http_protocol.c | 12 ++++++------ server/connection.c | 3 +-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/include/httpd.h b/include/httpd.h index 2a9b7e4d44..787d103f40 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -1044,8 +1044,6 @@ API_EXPORT(extern const char *) ap_psignature(const char *prefix, request_rec *r #endif #define strtoul strtoul_is_not_a_portable_function_use_strtol_instead -#define ap_is_aborted(abort) (abort->aborted == 1) - /* The C library has functions that allow const to be silently dropped ... these macros detect the drop in maintainer mode, but use the native methods far narmal builds diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 28f2966d50..7a0b8ff12d 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -2154,7 +2154,7 @@ API_EXPORT(int) ap_discard_request_body(request_rec *r) static void check_first_conn_error(const request_rec *r, const char *operation, ap_status_t status) { - if (!ap_is_aborted(r->connection)) { + if (!r->connection->aborted) { if (status == 0) status = ap_berror(r->connection->client); ap_log_rerror(APLOG_MARK, APLOG_INFO, status, r, @@ -2215,7 +2215,7 @@ API_EXPORT(long) ap_send_fd_length(ap_file_t *fd, request_rec *r, long length) if (length == 0) return 0; - while (!ap_is_aborted(r->connection)) { + while (!r->connection->aborted) { if ((length > 0) && (total_bytes_sent + IOBUFSIZE) > length) o = length - total_bytes_sent; else @@ -2224,7 +2224,7 @@ API_EXPORT(long) ap_send_fd_length(ap_file_t *fd, request_rec *r, long length) n = o; do { rv = ap_read(fd, buf, &n); - } while (rv == APR_EINTR && !ap_is_aborted(r->connection)); + } while (rv == APR_EINTR && !r->connection->aborted); if (n < 1) { break; @@ -2232,7 +2232,7 @@ API_EXPORT(long) ap_send_fd_length(ap_file_t *fd, request_rec *r, long length) o = 0; - while (n && !ap_is_aborted(r->connection)) { + while (n && !r->connection->aborted) { rv = ap_bwrite(r->connection->client, &buf[o], n, &w); if (w > 0) { total_bytes_sent += w; @@ -2280,13 +2280,13 @@ API_EXPORT(long) ap_send_fb_length(BUFF *fb, request_rec *r, long length) * as soon as possible */ ap_bsetopt(fb, BO_TIMEOUT, &zero_timeout); - while (!ap_is_aborted(r->connection)) { + while (!r->connection->aborted) { read_rv = ap_bread(fb, buf, sizeof(buf), &n); got_read: bytes_read = n; /* Regardless of read errors, EOF, etc, bytes may have been read */ o = 0; - while (n && !ap_is_aborted(r->connection)) { + while (n && !r->connection->aborted) { rv = ap_bwrite(r->connection->client, &buf[o], n, &w); if (w > 0) { total_bytes_sent += w; diff --git a/server/connection.c b/server/connection.c index 98235c1f00..a6a64f97d0 100644 --- a/server/connection.c +++ b/server/connection.c @@ -174,8 +174,7 @@ void ap_lingering_close(conn_rec *c) * to the peer. */ - if (ap_bshutdown(c->client, 1) != APR_SUCCESS - || ap_is_aborted(c)) { + if (ap_bshutdown(c->client, 1) != APR_SUCCESS || c->aborted) { ap_bclose(c->client); return; } -- 2.40.0