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:
@@ -2339,13 +2339,16 @@ API_EXPORT_NONSTD(int) ap_rvputs(request_rec *r,...)
|
|||||||
|
|
||||||
API_EXPORT(int) ap_rflush(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)) {
|
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");
|
"client stopped connection before rflush completed");
|
||||||
ap_bsetflag(r->connection->client, B_EOUT, 1);
|
ap_bsetflag(r->connection->client, B_EOUT, 1);
|
||||||
r->connection->aborted = 1;
|
r->connection->aborted = 1;
|
||||||
}
|
}
|
||||||
|
errno = rv;
|
||||||
return EOF;
|
return EOF;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -146,7 +146,7 @@ static void lingering_close(request_rec *r)
|
|||||||
|
|
||||||
/* Send any leftover data to the client, but never try to again */
|
/* 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);
|
ap_bclose(r->connection->client);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user