cvs commit: apache-apr/apr/threadproc/unix proc.c

1999-05-20 Thread rbb
rbb 99/05/20 12:05:08

  Modified:apr/file_io/unix dir.c open.c pipe.c
   apr/threadproc/unix proc.c
  Log:
  Removing the remaining evil free() left over from the original malloc
  implementation.
  
  Revision  ChangesPath
  1.7   +1 -1  apache-apr/apr/file_io/unix/dir.c
  
  Index: dir.c
  ===
  RCS file: /home/cvs/apache-apr/apr/file_io/unix/dir.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- dir.c 1999/05/13 18:38:02 1.6
  +++ dir.c 1999/05/20 19:05:02 1.7
  @@ -81,7 +81,7 @@
   thedir->entry = NULL;
   
   if (thedir->dirstruct == NULL) {
  -free(thedir);
  +thedir->dirstruct = NULL;
   return NULL;
   }
   else {
  
  
  
  1.20  +1 -2  apache-apr/apr/file_io/unix/open.c
  
  Index: open.c
  ===
  RCS file: /home/cvs/apache-apr/apr/file_io/unix/open.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- open.c1999/05/12 19:15:30 1.19
  +++ open.c1999/05/20 19:05:03 1.20
  @@ -110,8 +110,7 @@
   }
   if ((flag & APR_EXCL) && !(flag & APR_CREATE)) {
   errno = EACCES;
  -free(dafile->fname);
  - free(dafile);
  +dafile->filedes = -1;
   return NULL;
   }   
   
  
  
  
  1.6   +0 -1  apache-apr/apr/file_io/unix/pipe.c
  
  Index: pipe.c
  ===
  RCS file: /home/cvs/apache-apr/apr/file_io/unix/pipe.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- pipe.c1999/05/12 19:15:30 1.5
  +++ pipe.c1999/05/20 19:05:03 1.6
  @@ -86,7 +86,6 @@
   
   tmp = tempnam(dirpath, NULL);
   if (mkfifo(tmp, mode) == -1) {
  -free(tmp);
   return NULL;
   }
   return tmp;
  
  
  
  1.10  +0 -1  apache-apr/apr/threadproc/unix/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-apr/apr/threadproc/unix/proc.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- proc.c1999/05/12 20:04:23 1.9
  +++ proc.c1999/05/20 19:05:06 1.10
  @@ -175,7 +175,6 @@
   
   if (attr->currdir != NULL) {
   if (chdir(attr->currdir) == -1) {
  -free(new);
   exit(-1);   /* We have big problems, the child should exit. 
*/
   }
   }
  
  
  


cvs commit: apache-apr/apr/test Makefile.in ab_apr.c

1999-05-20 Thread rbb
rbb 99/05/20 11:01:46

  Modified:include  apr_network_io.h
   apr/test Makefile.in ab_apr.c
  Log:
  Correct mistake in apr_network_io.h, which would stop programs which needed 
both
  file and network def's to not compile.  Also finished bringing ab_apr.c up
  to the current apr level.
  
  Revision  ChangesPath
  1.20  +3 -3  apache-apr/include/apr_network_io.h
  
  Index: apr_network_io.h
  ===
  RCS file: /home/cvs/apache-apr/include/apr_network_io.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- apr_network_io.h  1999/05/19 15:17:16 1.19
  +++ apr_network_io.h  1999/05/20 18:01:34 1.20
  @@ -53,8 +53,8 @@
*
*/
   
  -#ifndef APR_FILE_IO_H
  -#define APR_FILE_IO_H
  +#ifndef APR_NETWORK_IO_H
  +#define APR_NETWORK_IO_H
   
   #include "apr_general.h"
   #include "apr_errno.h"
  @@ -122,5 +122,5 @@
   }
   #endif
   
  -#endif  /* ! APR_FILE_IO_H */
  +#endif  /* ! APR_NETWORK_IO_H */
   
  
  
  
  1.6   +22 -16apache-apr/apr/test/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-apr/apr/test/Makefile.in,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Makefile.in   1999/05/19 16:37:56 1.5
  +++ Makefile.in   1999/05/20 18:01:39 1.6
  @@ -9,8 +9,8 @@
   CFLAGS=-DLINUX=20 -g -O2 
   LDLIBS= -ldl -lm -lpthread -L../network_io -lnetwork -L../threadproc 
-lthreadproc -L../file_io -lfile -L../misc -lmisc -L../lib -lapr -L../time 
-ltime -L../locks -llock
   LDFLAGS= $(LDLIBS)
  -INCDIR=../../include
  -INCDIR1=../../../include
  +INCDIR=../include
  +INCDIR1=../../include
   INCLUDES=-I$(INCDIR) -I$(INCDIR1) 
   
   TARGETS= testfile \
  @@ -75,17 +75,23 @@
&& rm Makefile.new
   
   # DO NOT REMOVE
  -ab_apr.o: ab_apr.c $(INCDIR)/apr_network_io.h \
  - $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h
  -client.o: client.c $(INCDIR)/apr_network_io.h \
  - $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h
  -server.o: server.c $(INCDIR)/apr_network_io.h \
  - $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h
  -testfile.o: testfile.c $(INCDIR)/apr_file_io.h \
  - $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h
  -testproc.o: testproc.c $(INCDIR)/apr_thread_proc.h \
  - $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h \
  - $(INCDIR)/apr_errno.h
  -testsock.o: testsock.c $(INCDIR)/apr_thread_proc.h \
  - $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h \
  - $(INCDIR)/apr_errno.h
  +ab_apr.o: ab_apr.c ../../include/apr_network_io.h \
  + ../../include/apr_general.h ../../include/apr_errno.h \
  + ../../include/apr_file_io.h
  +client.o: client.c ../../include/apr_network_io.h \
  + ../../include/apr_general.h ../../include/apr_errno.h
  +server.o: server.c ../../include/apr_network_io.h \
  + ../../include/apr_general.h ../../include/apr_errno.h
  +testfile.o: testfile.c ../../include/apr_file_io.h \
  + ../../include/apr_general.h ../../include/apr_errno.h
  +testproc.o: testproc.c ../../include/apr_thread_proc.h \
  + ../../include/apr_file_io.h ../../include/apr_general.h \
  + ../../include/apr_errno.h
  +testsock.o: testsock.c ../../include/apr_thread_proc.h \
  + ../../include/apr_file_io.h ../../include/apr_general.h \
  + ../../include/apr_errno.h
  +testthread.o: testthread.c ../../include/apr_thread_proc.h \
  + ../../include/apr_file_io.h ../../include/apr_general.h \
  + ../../include/apr_errno.h ../../include/apr_lock.h
  +testtime.o: testtime.c ../../include/apr_time.h \
  + ../../include/apr_general.h ../../include/apr_errno.h
  
  
  
  1.8   +14 -31apache-apr/apr/test/ab_apr.c
  
  Index: ab_apr.c
  ===
  RCS file: /home/cvs/apache-apr/apr/test/ab_apr.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ab_apr.c  1999/05/19 16:37:56 1.7
  +++ ab_apr.c  1999/05/20 18:01:41 1.8
  @@ -103,27 +103,21 @@
   /* affects include files on Solaris */
   #define BSD_COMP
   
  +#include "apr_network_io.h"
  +#include "apr_file_io.h"
  +
   #include 
   #include 
   #include 
  -#include 
   #include 
   #include 
   #include 
   /*#include  */
   #include 
  -#include 
   #include 
   #include 
   
  -#include "apr_network_io.h"
   
  -/*#define ap_select   select */
  -/*#else  (!)NO_APACHE_INCLUDES */
  -/*#include "apr_config.h" */
  -/*#include  */
  -/*#include  */
  -/*#endif  NO_APACHE_INCLUDES */
   /* --- DEFINITIONS -- */
   
   /* maximum number of requests on a time limited test */
  @@ -172,7 +166,7 @@
   char path[1024]; /* path name */
   char postfile[1024]; /* name of file containing post data */
   char *postdata;  /* *buffer containing data from 
postfile */
  -int postlen = 0; /* length of da

cvs commit: apache-1.3 STATUS

1999-05-20 Thread bjh
bjh 99/05/20 03:17:47

  Modified:.STATUS
  Log:
  Add mod_auth_dbm patch
  
  Revision  ChangesPath
  1.689 +6 -1  apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.688
  retrieving revision 1.689
  diff -u -r1.688 -r1.689
  --- STATUS1999/05/19 13:26:03 1.688
  +++ STATUS1999/05/20 10:17:46 1.689
  @@ -1,5 +1,5 @@
 1.3 STATUS:
  -  Last modified at [$Date: 1999/05/19 13:26:03 $]
  +  Last modified at [$Date: 1999/05/20 10:17:46 $]
   
   Release:
   
  @@ -81,6 +81,11 @@
   
   
   Available Patches:
  +
  +* Brian Havard's patch to remove dependency of mod_auth_dbm on mod_auth.
  +  (PR#2598)
  + Message-ID: <[EMAIL PROTECTED]>
  + Status:
   
   * Aidan Cully's patch to allow assignment of 'ownership' of resources
 to either the server UID or the file's owner.
  
  
  


cvs commit: apache-apr/pthreads/src/main http_accept.c

1999-05-20 Thread manoj
manoj   99/05/19 22:00:42

  Modified:pthreads/src/main http_accept.c
  Log:
  Another cleanup. Get rid of an if (1) that was left around to make a
  different patch look small.
  
  Revision  ChangesPath
  1.14  +49 -60apache-apr/pthreads/src/main/http_accept.c
  
  Index: http_accept.c
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/main/http_accept.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -u -r1.13 -r1.14
  --- http_accept.c 1999/05/20 04:48:39 1.13
  +++ http_accept.c 1999/05/20 05:00:41 1.14
  @@ -399,72 +399,61 @@
   if (workers_may_exit)
   break;
   
  -/* XXX - Yes, we always go through the poll, at least for now.
  - *   - mvsk
  - */
  -if (1) {
  -/* more than one socket */
  -srv = poll(listenfds, num_listenfds + 1, -1);
  -if (workers_may_exit)
  -break;
  -if (srv < 0) {
  -/* XXX - h, poll can return EINTR. - mvsk */
  -if (errno == EINTR) {
  -continue;
  -}
  -SAFE_ACCEPT(accept_mutex_off(0));
  -SAFE_ACCEPT(intra_mutex_off(0));
  -/* Single Unix documents select as returning errnos
  - * EBADF, EINTR, and EINVAL... and in none of those
  - * cases does it make sense to continue.  In fact
  - * on Linux 2.0.x we seem to end up with EFAULT
  - * occasionally, and we'd loop forever due to it.
  - */
  -ap_log_error(APLOG_MARK, APLOG_ERR, (const server_rec*) 
ap_get_server_conf(), "select: (listen)");
  -clean_child_exit(1);
  -}
  -
  -if (srv == 0) {
  -/* Is srv == 0 a valid return? */
  +srv = poll(listenfds, num_listenfds + 1, -1);
  +if (workers_may_exit)
  +break;
  +if (srv < 0) {
  +/* XXX - h, poll can return EINTR. - mvsk */
  +if (errno == EINTR) {
   continue;
  +}
  +SAFE_ACCEPT(accept_mutex_off(0));
  +SAFE_ACCEPT(intra_mutex_off(0));
  +/* Single Unix documents select as returning errnos
  + * EBADF, EINTR, and EINVAL... and in none of those
  + * cases does it make sense to continue.  In fact
  + * on Linux 2.0.x we seem to end up with EFAULT
  + * occasionally, and we'd loop forever due to it.
  + */
  +ap_log_error(APLOG_MARK, APLOG_ERR, (const server_rec*) 
ap_get_server_conf(), "select: (listen)");
  +clean_child_exit(1);
  +}
  +
  +if (srv == 0) {
  +/* Is srv == 0 a valid return? */
  +continue;
}
   
  -/* find a listener */
  -/* Loop or NULL terminated list? That is the question. Be 
consistent across
  -   all the accept techniques */
  -lr = head_listener;
  -do {
  -/* XXX: should we check for PR_POLL_ERR ?? */
  -if (listenfds[lr->index].revents & POLLIN) {
  -/* advance to the next listener for next loop */
  -head_listener = lr->next;
  -/* hack to handle listenfds being NULL terminated 
list 
  - * rather than a loop 
  - */
  -if (!head_listener) {
  -head_listener = ap_listeners;
  -}
  -goto got_lr;
  +/* find a listener */
  +/* Loop or NULL terminated list? That is the question. Be 
consistent across
  +   all the accept techniques */
  +lr = head_listener;
  +do {
  +/* XXX: should we check for PR_POLL_ERR ?? */
  +if (listenfds[lr->index].revents & POLLIN) {
  +/* advance to the next listener for next loop */
  +head_listener = lr->next;
  +/* hack to handle listenfds being NULL terminated list 
  + * rather than a loop 
  + */
  +if (!head_listener) {
  +head_listener = ap_listeners;
   }
  -lr = lr->next;
  - if (lr == NULL) {
  +goto got_lr;
  +}
  +lr = lr->next;
  +   

cvs commit: apache-apr/pthreads/src/main http_accept.c

1999-05-20 Thread manoj
manoj   99/05/19 21:48:40

  Modified:pthreads/src/include acceptlock.h
   pthreads/src/main http_accept.c
  Log:
  Minor cleanup.
  
  Revision  ChangesPath
  1.6   +0 -3  apache-apr/pthreads/src/include/acceptlock.h
  
  Index: acceptlock.h
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/include/acceptlock.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -u -r1.5 -r1.6
  --- acceptlock.h  1999/05/09 08:39:29 1.5
  +++ acceptlock.h  1999/05/20 04:48:39 1.6
  @@ -121,9 +121,6 @@
   #endif
   #endif
   
  -/* Prototypes for functions required for accept_mutex */
  -void clean_child_exit(int);
  -
   #ifdef __cplusplus
   }
   #endif
  
  
  
  1.13  +1 -0  apache-apr/pthreads/src/main/http_accept.c
  
  Index: http_accept.c
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/main/http_accept.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -u -r1.12 -r1.13
  --- http_accept.c 1999/05/09 08:39:31 1.12
  +++ http_accept.c 1999/05/20 04:48:39 1.13
  @@ -57,6 +57,7 @@

   #include "httpd.h" 
   #include "http_log.h"
  +#include "http_main.h"
   #include "http_conf_globals.h" 
   #include "acceptlock.h"
   #include "fdqueue.h"
  
  
  


cvs commit: apache-apr/pthreads/src/main http_main.c

1999-05-20 Thread manoj
manoj   99/05/19 21:33:33

  Modified:pthreads/src/main http_main.c
  Log:
  Bug fix. Make sure that perform_idle_server_maintanence runs through
  whole scoreboard.
  
  Revision  ChangesPath
  1.80  +2 -2  apache-apr/pthreads/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/main/http_main.c,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -u -r1.79 -r1.80
  --- http_main.c   1999/04/29 20:09:44 1.79
  +++ http_main.c   1999/05/20 04:33:32 1.80
  @@ -2145,11 +2145,10 @@
++free_length;
}
if (!all_dead_threads) {
  - max_daemons_limit = i + 1;
  +last_non_dead = i;
}
   if (!any_dying_threads) {
   ++total_non_dead;
  -last_non_dead = i;
   
   if (idle_thread_count > ap_idle_thread_threshold) {
   idle_count++;
  @@ -2157,6 +2156,7 @@
   }
   }
   }
  +max_daemons_limit = last_non_dead + 1;
   if (idle_count > ap_daemons_max_free) {
   /* kill off one child... we use SIGWINCH because that'll cause it to
 * shut down gracefully, in case it happened to pick up a request