From: Ryan Bloom Date: Thu, 19 Oct 2000 01:24:10 +0000 (+0000) Subject: Change some of the BUFF calls to direct calls to the socket. X-Git-Tag: APACHE_2_0_ALPHA_8~306 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=946cd782e35b00312cabbba985e98463e5167df2;p=thirdparty%2Fapache%2Fhttpd.git Change some of the BUFF calls to direct calls to the socket. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86666 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/connection.c b/server/connection.c index e687188e0fb..32fa4bc409f 100644 --- a/server/connection.c +++ b/server/connection.c @@ -176,7 +176,7 @@ void ap_lingering_close(conn_rec *c) * to the peer. */ - if (ap_bshutdown(c->client, 1) != APR_SUCCESS || c->aborted) { + if (apr_shutdown(c->client_socket, 1) != APR_SUCCESS || c->aborted) { ap_bclose(c->client); return; } @@ -186,9 +186,9 @@ void ap_lingering_close(conn_rec *c) */ start = apr_now(); - timeout = MAX_SECS_TO_LINGER; + timeout = MAX_SECS_TO_LINGER * APR_USEC_PER_SEC; for (;;) { - ap_bsetopt(c->client, BO_TIMEOUT, &timeout); + apr_setsocketopt(c->client_socket, BO_TIMEOUT, timeout); rc = ap_bread(c->client, dummybuf, sizeof(dummybuf), &nbytes); if (rc != APR_SUCCESS || nbytes == 0) break; @@ -198,7 +198,7 @@ void ap_lingering_close(conn_rec *c) if (timeout >= MAX_SECS_TO_LINGER) break; /* figure out the new timeout */ - timeout = MAX_SECS_TO_LINGER - timeout; + timeout = (MAX_SECS_TO_LINGER - timeout) * APR_USEC_PER_SEC; } ap_bclose(c->client);