httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_core.c http_protocol.c
Date Wed, 18 Oct 2000 19:32:30 GMT
rbb         00/10/18 12:32:30

  Modified:    src/main http_core.c http_protocol.c
  Log:
  Make the core access the socket directly instead of going through the
  BUFF.  This doesn't actually change any behavior, it just makes the core
  access socket directly.
  
  Revision  Changes    Path
  1.177     +6 -8      apache-2.0/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
  retrieving revision 1.176
  retrieving revision 1.177
  diff -u -r1.176 -r1.177
  --- http_core.c	2000/10/17 22:34:14	1.176
  +++ http_core.c	2000/10/18 19:32:30	1.177
  @@ -2631,7 +2631,7 @@
           for (i = 0; i < hdtr->numheaders; i++) {
               sendlen += hdtr->headers[i].iov_len;
           }
  -        rv = writev_it_all(c->client->bsock, hdtr->headers, hdtr->numheaders,
  +        rv = writev_it_all(c->client_socket, hdtr->headers, hdtr->numheaders,
                              sendlen, &bytes_sent);
           if (rv == APR_SUCCESS)
               *nbytes += bytes_sent;     /* track total bytes sent */
  @@ -2650,7 +2650,7 @@
           rv = apr_read(fd, buffer, &sendlen);
           while (rv == APR_SUCCESS && sendlen) {
               bytes_sent = sendlen;
  -            rv = apr_send(c->client->bsock, &buffer[o], &bytes_sent);
  +            rv = apr_send(c->client_socket, &buffer[o], &bytes_sent);
               if (rv == APR_SUCCESS) {
                   sendlen -= bytes_sent; /* sendlen != bytes_sent ==> partial write */
                   o += bytes_sent;       /* o is where we are in the buffer */
  @@ -2669,7 +2669,7 @@
           for (i = 0; i < hdtr->numtrailers; i++) {
               sendlen += hdtr->trailers[i].iov_len;
           }
  -        rv = writev_it_all(c->client->bsock, hdtr->trailers, hdtr->numtrailers,
  +        rv = writev_it_all(c->client_socket, hdtr->trailers, hdtr->numtrailers,
                              sendlen, &bytes_sent);
           if (rv == APR_SUCCESS)
               *nbytes += bytes_sent;
  @@ -3332,13 +3332,11 @@
    */
   static int core_input_filter(ap_filter_t *f, ap_bucket_brigade *b, apr_ssize_t length)
   {
  -    apr_socket_t *csock = NULL;
       ap_bucket *e;
       
       if (!f->ctx) {    /* If we haven't passed up the socket yet... */
           f->ctx = (void *)1;
  -        ap_bpop_socket(&csock, f->c->client);
  -        e = ap_bucket_create_socket(csock);
  +        e = ap_bucket_create_socket(f->c->client_socket);
           AP_BRIGADE_INSERT_TAIL(b, e);
           return APR_SUCCESS;
       }
  @@ -3467,7 +3465,7 @@
                   flags |= APR_SENDFILE_DISCONNECT_SOCKET;
               }
               nbytes = flen;
  -            rv = apr_sendfile(c->client->bsock, 
  +            rv = apr_sendfile(c->client_socket, 
                                 fd,       /* The file to send */
                                 &hdtr,    /* Header and trailer iovecs */
                                 &foffset, /* Offset in file to begin sending from */
  @@ -3493,7 +3491,7 @@
   #endif
           }
           else {
  -            rv = writev_it_all(c->client->bsock, 
  +            rv = writev_it_all(c->client_socket, 
                                  vec, nvec, 
                                  nbytes, &bytes_sent);
           }
  
  
  
  1.190     +4 -4      apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.189
  retrieving revision 1.190
  diff -u -r1.189 -r1.190
  --- http_protocol.c	2000/10/18 17:42:43	1.189
  +++ http_protocol.c	2000/10/18 19:32:30	1.190
  @@ -2457,18 +2457,18 @@
   
       do {
           if (AP_BRIGADE_EMPTY(bb)) {
  -            apr_getsocketopt(r->connection->client->bsock, APR_SO_TIMEOUT, &timeout);
  -            apr_setsocketopt(r->connection->client->bsock, APR_SO_TIMEOUT, 0);
  +            apr_getsocketopt(r->connection->client_socket, APR_SO_TIMEOUT, &timeout);
  +            apr_setsocketopt(r->connection->client_socket, APR_SO_TIMEOUT, 0);
               if (ap_get_brigade(r->input_filters, bb, 9999) != APR_SUCCESS) {
                   /* if we actually fail here, we want to just return and
                    * stop trying to read data from the client.
                    */
  -                apr_setsocketopt(r->connection->client->bsock, APR_SO_TIMEOUT,
timeout);
  +                apr_setsocketopt(r->connection->client_socket, APR_SO_TIMEOUT, timeout);
                   r->connection->keepalive = -1;
                   ap_brigade_destroy(bb);
                   return -1;
               }
  -            apr_setsocketopt(r->connection->client->bsock, APR_SO_TIMEOUT, timeout);
  +            apr_setsocketopt(r->connection->client_socket, APR_SO_TIMEOUT, timeout);
           }
           b = AP_BRIGADE_FIRST(bb);
       } while (AP_BRIGADE_EMPTY(bb));
  
  
  

Mime
View raw message