1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

ap_bflush and ap_bclose now return ap_status_t error codes instead of

returning -1 and setting errno.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84040 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Manoj Kasichainula
1999-10-26 22:25:02 +00:00
parent 0c15754e72
commit 8c4d317e7f
2 changed files with 6 additions and 3 deletions

View File

@@ -2339,13 +2339,16 @@ API_EXPORT_NONSTD(int) ap_rvputs(request_rec *r,...)
API_EXPORT(int) ap_rflush(request_rec *r)
{
if (ap_bflush(r->connection->client) < 0) {
ap_status_t rv;
if ((rv = ap_bflush(r->connection->client)) != APR_SUCCESS) {
if (!ap_is_aborted(r->connection)) {
ap_log_rerror(APLOG_MARK, APLOG_INFO, errno, r,
ap_log_rerror(APLOG_MARK, APLOG_INFO, rv, r,
"client stopped connection before rflush completed");
ap_bsetflag(r->connection->client, B_EOUT, 1);
r->connection->aborted = 1;
}
errno = rv;
return EOF;
}
return 0;

View File

@@ -146,7 +146,7 @@ static void lingering_close(request_rec *r)
/* Send any leftover data to the client, but never try to again */
if (ap_bflush(r->connection->client) == -1) {
if (ap_bflush(r->connection->client) != APR_SUCCESS) {
ap_bclose(r->connection->client);
return;
}