cvs commit: apache-2.0/src/os/win32 iol_socket.c

2000-01-27 Thread stoddard
stoddard00/01/26 21:58:14

  Modified:src/lib/apr/network_io/win32 sendrecv.c sockets.c
   src/main http_protocol.c
   src/modules/mpm/winnt winnt.c winnt.h
   src/os/win32 iol_socket.c
  Log:
  More sendfile work. Use new sendfile API in Apache, update Windows MPM
  to begin using APR socket API.
  Note:
  sendfile on Unix side is broken. Need to detect for NULL hdtr. I'll do
  it later this week if no one else steps up.
  
  Revision  ChangesPath
  1.6   +2 -4  apache-2.0/src/lib/apr/network_io/win32/sendrecv.c
  
  Index: sendrecv.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/win32/sendrecv.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- sendrecv.c2000/01/26 05:56:40 1.5
  +++ sendrecv.c2000/01/27 05:57:34 1.6
  @@ -216,7 +216,7 @@
   
   /* TransmitFile can only send one header and one footer */
   memset(&tfb, '0', sizeof (tfb));
  -if (hdtr->numheaders) {
  +if (hdtr && hdtr->numheaders) {
   ptfb = &tfb;
   for (i = 0; i < hdtr->numheaders; i++) {
   tfb.HeadLength += hdtr->headers[i].iov_len;
  @@ -230,7 +230,7 @@
   ptr += hdtr->headers[i].iov_len;
   }
   }
  -if (hdtr->numtrailers) {
  +if (hdtr && hdtr->numtrailers) {
   ptfb = &tfb;
   for (i = 0; i < hdtr->numtrailers; i++) {
   tfb.TailLength += hdtr->headers[i].iov_len;
  @@ -243,8 +243,6 @@
  hdtr->trailers[i].iov_len);
   ptr += hdtr->trailers[i].iov_len;
   }
  -
  -
   }
   #ifdef OVERLAPPED
   memset(&overlapped,'0', sizeof(overlapped));
  
  
  
  1.17  +12 -1 apache-2.0/src/lib/apr/network_io/win32/sockets.c
  
  Index: sockets.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/win32/sockets.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- sockets.c 1999/12/17 12:32:16 1.16
  +++ sockets.c 2000/01/27 05:57:38 1.17
  @@ -63,7 +63,7 @@
   #include 
   
   
  -ap_status_t socket_cleanup(void *sock)
  +static ap_status_t socket_cleanup(void *sock)
   {
   struct socket_t *thesocket = sock;
   if (closesocket(thesocket->sock) != SOCKET_ERROR) {
  @@ -271,6 +271,17 @@
   if ((*sock) == NULL) {
   (*sock) = (struct socket_t *)ap_palloc(cont, sizeof(struct 
socket_t));
   (*sock)->cntxt = cont;
  +(*sock)->local_addr = (struct sockaddr_in *)ap_palloc((*sock)->cntxt,
  + sizeof(struct sockaddr_in));
  +(*sock)->remote_addr = (struct sockaddr_in 
*)ap_palloc((*sock)->cntxt,
  +  sizeof(struct sockaddr_in));
  +
  +if ((*sock)->local_addr == NULL || (*sock)->remote_addr == NULL) {
  +return APR_ENOMEM;
  +}
  + 
  +(*sock)->addr_len = sizeof(*(*sock)->local_addr);
  +(*sock)->timeout = -1;
   }
   (*sock)->sock = *thesock;
   return APR_SUCCESS;
  
  
  
  1.51  +6 -2  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.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- http_protocol.c   2000/01/19 02:09:03 1.50
  +++ http_protocol.c   2000/01/27 05:57:47 1.51
  @@ -2019,8 +2019,12 @@
   #ifdef HAVE_SENDFILE
   if (!r->chunked) {
   ap_bflush(r->connection->client);
  -if (iol_sendfile(r->connection->client->iol, fd, len,
  - NULL, 0, 0) != APR_SUCCESS) {
  +if (iol_sendfile(r->connection->client->iol, 
  + fd,  /* The file to send */
  + NULL, /* header and trailer iovecs */
  + 0,   /* Offset in file to begin sending from */
  + &len,
  + 0) != APR_SUCCESS) {
   ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
 "ap_send_fd: iol_sendfile failed.");
   }
  
  
  
  1.36  +14 -7 apache-2.0/src/modules/mpm/winnt/winnt.c
  
  Index: winnt.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/winnt.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- winnt.c   1999/12/20 19:52:51 1.35
  +++ winnt.c   2000/01/27 05:57:57 1.36
  @@ -104,6 +104,15 @@
   int my_pid;
   int parent_pid;
   
  +static ap_status_t socket_cleanup(void *sock)
  +{
  +struct socket_t *thesocket = sock;
  +SOCKET sd;
  +if (ap_get_os_sock(&sd, thesocket) == APR_SUCCESS) {
  +closesocket(sd);
  +

cvs commit: apache-site/mirrors index.html mirrors.check mirrors.list

2000-01-27 Thread brian
brian   00/01/27 14:44:17

  Modified:mirrors  index.html mirrors.check mirrors.list
  Log:
  modified digital.com entry.
  
  Revision  ChangesPath
  1.77  +4 -4  apache-site/mirrors/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/apache-site/mirrors/index.html,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- index.html2000/01/15 04:54:10 1.76
  +++ index.html2000/01/27 22:44:12 1.77
  @@ -381,8 +381,8 @@
   
   http://mirrors.partnersforever.net/apache/";>us -
   
  -http://opnsrc.service.digital.com/apache/";>us -
  -
  +http://opnsrc.support.digital.com/apache/";>us -
  +
   http://sunsite.utk.edu/apache/";>us -
   
   http://us-mirror.www.ai.net/pub/apache/";>us -
  @@ -658,8 +658,8 @@
   
   ftp://mirrors.partnersforever.net/pub/apache/dist/";>us -
   
  -ftp://opnsrc.service.digital.com/apache/dist/";>us -
  -
  +ftp://opnsrc.support.digital.com/apache/dist/";>us -
  +
   ftp://us-mirror.ftp.ai.net/pub/apache/dist/";>us -
   
   ftp://ftp.is.co.za/internet/www/servers/apache/";>za -
  
  
  
  1.6   +1 -1  apache-site/mirrors/mirrors.check
  
  Index: mirrors.check
  ===
  RCS file: /home/cvs/apache-site/mirrors/mirrors.check,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mirrors.check 2000/01/15 04:54:10 1.5
  +++ mirrors.check 2000/01/27 22:44:13 1.6
  @@ -1 +1 @@
  -2000-01-14
  +2000-01-27
  
  
  
  1.91  +2 -2  apache-site/mirrors/mirrors.list
  
  Index: mirrors.list
  ===
  RCS file: /home/cvs/apache-site/mirrors/mirrors.list,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- mirrors.list  2000/01/15 04:54:10 1.90
  +++ mirrors.list  2000/01/27 22:44:14 1.91
  @@ -123,7 +123,7 @@
   ftp  us  ftp://ftp.twoguys.org/pub/apache/   [EMAIL PROTECTED]
   ftp  us  ftp://galileo.galilei.com/pub/apache/   
   ftp  us  ftp://mirrors.partnersforever.net/pub/apache/dist/  [EMAIL 
PROTECTED]
  -ftp  us  ftp://opnsrc.service.digital.com/apache/dist/   [EMAIL 
PROTECTED]
  +ftp  us  ftp://opnsrc.support.digital.com/apache/dist/   [EMAIL 
PROTECTED]
   ftp  us  ftp://us-mirror.ftp.ai.net/pub/apache/dist/ [EMAIL 
PROTECTED]
   ftp  za  ftp://ftp.is.co.za/internet/www/servers/apache/ [EMAIL 
PROTECTED]
   ftp  za  ftp://ftp.linux.co.za/pub/apache/   [EMAIL PROTECTED]
  @@ -308,7 +308,7 @@
   http us  http://galileo.galilei.com/apache/
   http us  http://mirrors.hotdog.org/apache/   [EMAIL PROTECTED]
   http us  http://mirrors.partnersforever.net/apache/  [EMAIL 
PROTECTED]
  -http us  http://opnsrc.service.digital.com/apache/   [EMAIL 
PROTECTED]
  +http us  http://opnsrc.support.digital.com/apache/   [EMAIL 
PROTECTED]
   http us  http://sunsite.utk.edu/apache/  [EMAIL PROTECTED]
   http us  http://us-mirror.www.ai.net/pub/apache/ [EMAIL PROTECTED]
   http us  http://www.communitech.net/apache/  [EMAIL PROTECTED]
  
  
  


cvs commit: apache-site related_projects.html

2000-01-27 Thread fielding
fielding00/01/27 15:30:18

  Modified:.related_projects.html
  Log:
  Add mention of kshIndex
  
  Submitted by: Dana French <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.44  +12 -0 apache-site/related_projects.html
  
  Index: related_projects.html
  ===
  RCS file: /home/cvs/apache-site/related_projects.html,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- related_projects.html 2000/01/21 21:22:42 1.43
  +++ related_projects.html 2000/01/27 23:30:15 1.44
  @@ -34,6 +34,7 @@
   Apache Documentation Project
   Apache Quick Reference Card
   Webmonkey XSSI Extensions
  +kshIndex fancy index utility
   
   
   Commercial Products
  @@ -226,6 +227,17 @@
   You can http://www.hotwired.com/webmonkey/javascript/code_library/wm_dwxssi_ext/";>obtain
 the extensions here.
   
   
  +
  +
  +kshIndex fancy index utility
  +
  +http://www.aigsupport.com/fancyIndex/Tools/CGI/kshIndex/";>kshIndex
  +is a set of utilities and scripts built around the
  +Apache fancyIndex functions.  It allows webmasters to provide
  +a variety of functions to users including automated indexing
  +of URL's, files, and directories, user authorization management,
  +cascading user customization, events calendars, contact lists, etc.
   
   
   Apache Week
  
  
  


cvs commit: apache-2.0/src/lib/apr/test testshmem.c Makefile.in

2000-01-27 Thread rbb
rbb 00/01/27 15:49:40

  Modified:src/lib/apr configure.in
   src/lib/apr/include apr.h.in apr_errno.h apr_shmem.h
   src/lib/apr/shmem/unix Makefile.in shmem.c
   src/lib/apr/test Makefile.in
  Added:   src/lib/apr/test testshmem.c
  Removed: src/lib/apr/shmem shmem.c
  Log:
  A first pass at shared memory for Unix.  This is still pretty ugly, but I
  will clean it up over the next few days.  At least this gives everybody
  some idea of where I want the shared memory stuff to go in APR.
  
  Revision  ChangesPath
  1.49  +15 -1 apache-2.0/src/lib/apr/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- configure.in  2000/01/26 18:06:30 1.48
  +++ configure.in  2000/01/27 23:49:23 1.49
  @@ -5,7 +5,7 @@
   
   # These added to allow default directories to be used...
   DEFAULT_OSDIR="unix"
  -MODULES="file_io network_io threadproc misc locks time mmap" 
  +MODULES="file_io network_io threadproc misc locks time mmap shmem" 
   
   echo "Configuring APR library"
   echo "Platform: ${OS}"
  @@ -357,6 +357,15 @@
   procpthreadser="0"
   fi
   
  +# Shared memory support.  Until I figure out how to do this well, we are hard
  +# coding this.  I am hoping to do this more generally ASAP.
  +anonymous_shm="1"
  +filebased_shm="0"
  +keybased_shm="0"
  +AC_SUBST(anonymous_shm)
  +AC_SUBST(filebased_shm)
  +AC_SUBST(keybased_shm)
  +
   dnl Start building stuff from our information
   AC_SUBST(LDLIBS)
   AC_SUBST(OPTIM)
  @@ -399,6 +408,11 @@
   if test "$ac_cv_struct_tm_gmtoff" = "yes"; then
   AC_DEFINE(HAVE_GMTOFF)
   fi
  +
  +# run the MM config script regardless of whether we are going to use 
  +# it or not.  When we have a much better idea of who is using MM, we can
  +# run this on a more conditional basis.
  +AC_CONFIG_SUBDIRS(shmem/unix/mm)
   
   MAKEFILE1="Makefile lib/Makefile "
   SUBDIRS="lib "
  
  
  
  1.12  +5 -0  apache-2.0/src/lib/apr/include/apr.h.in
  
  Index: apr.h.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr.h.in,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- apr.h.in  2000/01/26 18:06:31 1.11
  +++ apr.h.in  2000/01/27 23:49:26 1.12
  @@ -40,6 +40,11 @@
   #define APR_USE_PROC_PTHREAD_SERIALIZE@procpthreadser@ 
   #define APR_USE_PTHREAD_SERIALIZE @pthreadser@ 
   
  +#define APR_USES_ANONYMOUS_SHM@anonymous_shm@
  +#define APR_USES_FILEBASED_SHM@filebased_shm@
  +#define APR_USES_KEYBASED_SHM @keybased_shm@
  +
  +
   #define APR_HAVE_IN_ADDR@have_in_addr@
   #define APR_HAVE_INET_ADDR  @inet_addr@
   #define APR_HAVE_INET_NETWORK   @inet_network@
  
  
  
  1.13  +4 -0  apache-2.0/src/lib/apr/include/apr_errno.h
  
  Index: apr_errno.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_errno.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- apr_errno.h   1999/12/20 16:10:11 1.12
  +++ apr_errno.h   2000/01/27 23:49:27 1.13
  @@ -107,6 +107,7 @@
   #define APR_ENOTHREAD  (APR_OS_START_ERROR + 12)
   #define APR_ENOTHDKEY  (APR_OS_START_ERROR + 13)
   #define APR_ENOTTHREADSAFE (APR_OS_START_ERROR + 14)
  +#define APR_ESHMLOCK   (APR_OS_START_ERROR + 15)
   
   /* APR STATUS VALUES */
   #define APR_INCHILD(APR_OS_START_STATUS + 1)
  @@ -127,6 +128,9 @@
   #define APR_LESS   (APR_OS_START_STATUS + 16)
   #define APR_EQUAL  (APR_OS_START_STATUS + 17)
   #define APR_MORE   (APR_OS_START_STATUS + 18)
  +#define APR_ANONYMOUS  (APR_OS_START_STATUS + 19)
  +#define APR_FILEBASED  (APR_OS_START_STATUS + 20)
  +#define APR_KEYBASED   (APR_OS_START_STATUS + 21)
   
   /* A simple value to be used to initialze a status variable. */
   #define APR_EINIT  (APR_OS_START_STATUS + 16)  
  
  
  
  1.3   +19 -12apache-2.0/src/lib/apr/include/apr_shmem.h
  
  Index: apr_shmem.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_shmem.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- apr_shmem.h   1999/10/04 16:36:55 1.2
  +++ apr_shmem.h   2000/01/27 23:49:27 1.3
  @@ -56,6 +56,7 @@
   #ifndef APR_SHMEM_H
   #define APR_SHMEM_H
   
  +#include "apr.h"
   #include "apr_general.h"
   #include "apr_errno.h"
   
  @@ -63,19 +64,25 @@
   extern "C" {
   #endif /* __cplusplus */
   
  -typedef   struct shmem_t ap_shmem_t
  +#if APR_USES_ANONYMOUS_SHM
  +typedef   void   ap_shm_name_t;
  +#el