diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2002-07-15 09:46:19 +0200 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2002-07-15 09:46:19 +0200 |
commit | 6b69fe06c071d15238381e5622d3806678a74915 (patch) | |
tree | 01af0453b6ab916fcb84c1bdc81f174da6677d84 /server/core.c | |
parent | The macros remove how much legibility? (diff) | |
download | apache2-6b69fe06c071d15238381e5622d3806678a74915.tar.xz apache2-6b69fe06c071d15238381e5622d3806678a74915.zip |
Timeout/time fixes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96055 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/core.c')
-rw-r--r-- | server/core.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/server/core.c b/server/core.c index 17c7b21bae..3b0603532a 100644 --- a/server/core.c +++ b/server/core.c @@ -2686,11 +2686,11 @@ static apr_status_t sendfile_it_all(core_net_rec *c, { apr_status_t rv; #ifdef AP_DEBUG - apr_int32_t timeout = 0; + apr_interval_time_t timeout = 0; #endif - AP_DEBUG_ASSERT((apr_getsocketopt(c->client_socket, APR_SO_TIMEOUT, - &timeout) == APR_SUCCESS) + AP_DEBUG_ASSERT((apr_socket_timeout_get(c->client_socket, &timeout) + == APR_SUCCESS) && timeout > 0); /* socket must be in timeout mode */ do { @@ -3308,16 +3308,15 @@ static int net_time_filter(ap_filter_t *f, apr_bucket_brigade *b, if (mode != AP_MODE_INIT && mode != AP_MODE_EATCRLF) { if (*first_line) { - apr_setsocketopt(csd, APR_SO_TIMEOUT, - (int)(keptalive - ? f->c->base_server->keep_alive_timeout - : f->c->base_server->timeout)); + apr_socket_timeout_set(csd, + keptalive + ? f->c->base_server->keep_alive_timeout + : f->c->base_server->timeout); *first_line = 0; } else { if (keptalive) { - apr_setsocketopt(csd, APR_SO_TIMEOUT, - (int)(f->c->base_server->timeout)); + apr_socket_timeout_set(csd, f->c->base_server->timeout); } } } |