cvs commit: apache-1.3/src/lib/expat MPL-1_0.html Makefile.tmpl asciitab.h expat.html gplelect.html hashtable.c hashtable.h iasciitab.h latin1tab.h nametab.h utf8tab.h xmlparse.c xmlparse.h xmlrole.c xmlrole.h xmltok.c xmltok.h xmltok_impl.c xmltok_impl.h

1999-05-26 Thread gstein
gstein  99/05/25 20:45:30

  Removed: src/lib/expat MPL-1_0.html Makefile.tmpl asciitab.h
expat.html gplelect.html hashtable.c hashtable.h
iasciitab.h latin1tab.h nametab.h utf8tab.h
xmlparse.c xmlparse.h xmlrole.c xmlrole.h xmltok.c
xmltok.h xmltok_impl.c xmltok_impl.h
  Log:
  backing Expat out due to license issues.


cvs commit: apache-apr STATUS

1999-05-26 Thread manoj
manoj   99/05/25 21:04:32

  Modified:.STATUS
  Log:
  64 * 8 > 256. Linux was hitting user process limits.
  
  Revision  ChangesPath
  1.26  +7 -7  apache-apr/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/apache-apr/STATUS,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -u -r1.25 -r1.26
  --- STATUS1999/05/25 05:49:27 1.25
  +++ STATUS1999/05/26 04:04:32 1.26
  @@ -1,5 +1,5 @@
   Apache Portable Runtime STATUS:
  -Last modified at [$Date: 1999/05/25 05:49:27 $]
  +Last modified at [$Date: 1999/05/26 04:04:32 $]
   
   Release:
   
  @@ -43,12 +43,12 @@
   
   Needs patch:
   
  -  With Linux 2.2.9 + glibc 2.1.1pre (from RH 6), if MaxRequestsPerChild
  -  is low (e.g. 5) and ThreadsPerChild is high (e.g. 64), some processes
  -  will hang in pthread_create. This is an insane configuration, though.
  -
  -  With AIX 4.2, if MaxRequestsPerChild is low and ThreadsPerChild is
  -  high, the signal delivered to sigwait gets dropped on the floor.
  +  With AIX 4.2, if MaxRequestsPerChild is low (e.g. 5) and
  +  ThreadsPerChild is high (e.g. 64), the signal delivered to sigwait
  +  gets dropped on the floor. The hypothesis is that the signals blocked
  +  by pthread_sigmask aren't kept pending as they should be, so when
  +  worker threads exit quickly and signal the sigwait thread before the
  +  sigwait() call has been entered, the thread never gets the signal.
   
   Open issues:
   
  
  
  


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

1999-05-26 Thread manoj
manoj   99/05/26 00:06:32

  Modified:pthreads/src/main http_main.c
  Log:
  When a child dies, we now mark it dead after wait_or_timeout() in the
  parent; marking it dead in the child itself is somewhat incorrect and
  unnecessary.
  
  Revision  ChangesPath
  1.86  +0 -7  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.85
  retrieving revision 1.86
  diff -u -u -r1.85 -r1.86
  --- http_main.c   1999/05/24 20:33:32 1.85
  +++ http_main.c   1999/05/26 07:06:31 1.86
  @@ -389,17 +389,10 @@
  static void clean_child_exit(int code) __attribute__ ((noreturn)); */
   void clean_child_exit(int code)
   {
  -int child_num = find_child_by_pid(getpid());
  -int i;
  -
  -for (i = 0; i < ap_threads_per_child + ap_acceptors_per_child; i++)
  -ap_update_child_status(child_num, i, SERVER_DEAD, (request_rec *) 
NULL);
  -
   if (pchild) {
ap_child_exit_modules(pchild, server_conf);
ap_destroy_pool(pchild);
   }
  -
   exit(code);
   }
   
  
  
  


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

1999-05-26 Thread manoj
manoj   99/05/26 00:09:19

  Modified:pthreads/src/main http_main.c
  Log:
  Move a little piece of code so it isn't run as root
  
  Revision  ChangesPath
  1.87  +1 -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.86
  retrieving revision 1.87
  diff -u -u -r1.86 -r1.87
  --- http_main.c   1999/05/26 07:06:31 1.86
  +++ http_main.c   1999/05/26 07:09:18 1.87
  @@ -1898,8 +1898,6 @@
   /*stuff to do before we switch id's, so we have permissions.*/
   reopen_scoreboard(pchild);
   
  -accept_child_init(pchild, ap_threads_per_child);
  -
   set_group_privs();
   
   if (!geteuid() && (setuid(ap_user_id) == -1)) {
  @@ -1908,6 +1906,7 @@
clean_child_exit(APEXIT_CHILDFATAL);
   }
   
  +accept_child_init(pchild, ap_threads_per_child);
   ap_child_init_modules(pchild, server_conf);
   
   /*done with init critical section */
  
  
  


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

1999-05-26 Thread manoj
manoj   99/05/26 00:12:32

  Modified:pthreads/src/main http_main.c
  Log:
  Cleanup and dead code removal.
  
  Revision  ChangesPath
  1.88  +15 -73apache-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.87
  retrieving revision 1.88
  diff -u -u -r1.87 -r1.88
  --- http_main.c   1999/05/26 07:09:18 1.87
  +++ http_main.c   1999/05/26 07:12:30 1.88
  @@ -98,20 +98,12 @@
   #include  
   #include  
   
  -#ifdef USE_SHMGET_SCOREBOARD
  -#include 
  -#include 
  -#include 
  -#endif
  - 
   #include "pthread.h" 
   /*#include initialization if any 
   #include threadabstractionlayer; 
   #include networkiolayer 
   #include lock */ 

  -#include  
  - 
   /* This next function is never used. It is here to ensure that if we 
* make all the modules into shared libraries that core httpd still 
* includes the full Apache API. Without this function the objects in 
  @@ -218,33 +210,6 @@
   
   int ap_pipe_of_death[2];
   
  -/* thread local storage code that isn't used right now */
  -
  -#if 0
  -/* stuff that needs thread local store in main */
  -typedef struct {
  -jmp_buf thread_exit;
  -int generation;
  -} tls_main_t;
  -
  -static pthread_key_t tls_main_key;/*  */
  -
  -static tls_main_t *gettls(pthread_key_t tls_main_key)
  -{
  -tls_main_t *tls_p;
  -tls_p = pthread_getspecific(tls_main_key);
  -if (!tls_p) {
  -tls_p = NULL;
  -fprintf(stderr, "pthread_getspecific failed\n");
  -}
  -
  -return tls_p;
  -}
  -#define tls() ((tls_main_t *) gettls(tls_main_key)) /* Z */
  -#endif
  -
  -
  -
   /* *Non*-shared http_main globals... */
   
   static server_rec *server_conf;
  @@ -961,24 +926,9 @@
*/
   }
   
  -/*
  - * Connection structures and accounting...
  - */
  -
  -/* XXX - alarms will need to be blockable at some point */
  -
  -static int alarms_blocked = 0;
  -static int exit_after_unblock = 0;
   static void just_die(int sig)
  -{/* SIGHUP to child process??? */
  -/* if alarms are blocked we have to wait to die otherwise we might
  - * end up with corruption in alloc.c's internal structures */
  -if (alarms_blocked) {
  - exit_after_unblock = 1;
  -}
  -else {
  - clean_child_exit(0);
  -}
  +{
  +clean_child_exit(0);
   }
   
   /*
  @@ -1926,9 +1876,12 @@
   pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
   for (i=0; i < ap_threads_per_child; i++) {
   
  -my_info = NULL;
  - 
my_info = (proc_info *)malloc(sizeof(proc_info));
  +if (my_info == NULL) {
  +ap_log_error(APLOG_MARK, APLOG_ALERT, server_conf,
  +  "malloc: out of memory");
  +clean_child_exit(APEXIT_CHILDFATAL);
  +}
my_info->pid = my_child_num;
   my_info->tid = i;
my_info->sd = 0;
  @@ -1940,13 +1893,11 @@
if (pthread_create(&thread, &thread_attr, worker_thread, my_info)) {
ap_log_error(APLOG_MARK, APLOG_ALERT, server_conf,
 "pthread_create: unable to create worker thread");
  - /* 
  -  * We failed to create a thread.  Update the scoreboard,  
  -  * or it will say SERVER_STARTING forever.
  -  */
  - (void) ap_update_child_status(my_child_num, i, SERVER_DEAD, 
  -   (request_rec *) NULL);
  - exit(1);   /* We won't always exit here, but for no this is okay */
  +/* In case system resources are maxxed out, we don't want
  +   Apache running away with the CPU trying to fork over and
  +   over and over again if we exit. */
  +sleep(10);
  + clean_child_exit(APEXIT_CHILDFATAL);
}
   
/* We let each thread update it's own scoreboard entry.  This is done
  @@ -1969,8 +1920,8 @@
   break;
   default:
   ap_log_error(APLOG_MARK, APLOG_ALERT, server_conf,
  -"received strange signal: %d", signal_received);
  -
  +"received impossible signal: %d", signal_received);
  +just_die(SIGTERM);
   }
   }
   
  @@ -1991,8 +1942,6 @@
   
   if (one_process) {
set_signals();
  - /* Needed even in the one process case because lookup of the process
  -  * pid sometimes must go through the scoreboard */
   ap_scoreboard_image->parent[slot].pid = getpid();
child_main(slot);
   }
  @@ -2000,12 +1949,6 @@
   Explain1("Starting new child in slot %d",slot);
   if ((pid = fork()) == -1) {
   ap_log_error(APLOG_MARK, APLOG_ERR, s, "f

cvs commit: apache-apr/include apr_file_io.h apr_thread_proc.h

1999-05-26 Thread rbb
rbb 99/05/26 06:47:04

  Modified:apr/file_io/unix pipe.c readwrite.c
   apr/test testfile.c testproc.c testsock.c
   apr/threadproc/unix proc.c
   include  apr_file_io.h apr_thread_proc.h
  Log:
  The process test works with these changes.  Next up is the socket test.
  
  Revision  ChangesPath
  1.10  +10 -7 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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- pipe.c1999/05/25 03:14:15 1.9
  +++ pipe.c1999/05/26 13:46:54 1.10
  @@ -56,13 +56,14 @@
   #include "fileio.h"
   #include "apr_file_io.h"
   #include "apr_general.h"
  +#include "apr_lib.h"
   #include 
   #include 
   #include 
   #include 
   #include 
   
  -ap_status_t ap_create_pipe(ap_context_t *cont, struct file_t *in, struct 
file_t *out)
  +ap_status_t ap_create_pipe(ap_context_t *cont, struct file_t **in, struct 
file_t **out)
   {
   int filedes[2];
   
  @@ -70,13 +71,15 @@
   return errno;
   }
   
  -in->cntxt = cont;
  -in->filedes = filedes[0];
  -in->fname = strdup("PIPE");
  +(*in) = (struct file_t *)ap_palloc(cont->pool, sizeof(struct file_t));
  +(*in)->cntxt = cont;
  +(*in)->filedes = filedes[0];
  +(*in)->fname = ap_pstrdup(cont->pool, "PIPE");
   
  -out->cntxt = cont;
  -out->filedes = filedes[1];
  -out->fname = strdup("PIPE");
  +(*out) = (struct file_t *)ap_palloc(cont->pool, sizeof(struct file_t));
  +(*out)->cntxt = cont;
  +(*out)->filedes = filedes[1];
  +(*out)->fname = ap_pstrdup(cont->pool, "PIPE");
   
   return APR_SUCCESS;
   }
  
  
  
  1.12  +7 -6  apache-apr/apr/file_io/unix/readwrite.c
  
  Index: readwrite.c
  ===
  RCS file: /home/cvs/apache-apr/apr/file_io/unix/readwrite.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- readwrite.c   1999/05/25 03:14:15 1.11
  +++ readwrite.c   1999/05/26 13:46:55 1.12
  @@ -71,7 +71,6 @@
   return APR_EBADF;
   }
   
  -buf = ap_palloc(thefile->cntxt->pool, *nbytes);
   rv = read(thefile->filedes, buf, *nbytes);
   
   *nbytes = rv;
  @@ -90,11 +89,13 @@
   
   rv = write(thefile->filedes, buf, *nbytes);
   
  -if (stat(thefile->fname, &info) == 0) {
  -thefile->size = info.st_size;
  -thefile->atime = info.st_atime;
  -thefile->mtime = info.st_mtime;
  -thefile->ctime = info.st_ctime;
  +if (strcmp(thefile->fname, "PIPE")) {
  +if (stat(thefile->fname, &info) == 0) {
  +thefile->size = info.st_size;
  +thefile->atime = info.st_atime;
  +thefile->mtime = info.st_mtime;
  +thefile->ctime = info.st_ctime;
  +}
   }
   *nbytes = rv;
   return APR_SUCCESS;
  
  
  
  1.22  +1 -0  apache-apr/apr/test/testfile.c
  
  Index: testfile.c
  ===
  RCS file: /home/cvs/apache-apr/apr/test/testfile.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- testfile.c1999/05/25 03:22:07 1.21
  +++ testfile.c1999/05/26 13:46:58 1.22
  @@ -134,6 +134,7 @@
   
   fprintf(stdout, "\tReading from the file...");
   nbytes = (ap_ssize_t)strlen("this is a test");
  +buf = (char *)ap_palloc(context->pool, nbytes + 1);
   if (ap_read(thefile, buf, &nbytes) != APR_SUCCESS) {
   perror("something's wrong");
   exit(-1);
  
  
  
  1.7   +14 -16apache-apr/apr/test/testproc.c
  
  Index: testproc.c
  ===
  RCS file: /home/cvs/apache-apr/apr/test/testproc.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- testproc.c1999/05/25 17:03:54 1.6
  +++ testproc.c1999/05/26 13:46:58 1.7
  @@ -56,6 +56,7 @@
   #include "apr_thread_proc.h"
   #include "apr_errno.h"
   #include "apr_general.h"
  +#include "apr_lib.h"
   #include "errno.h"
   #include 
   #include 
  @@ -70,21 +71,19 @@
   ap_context_t *context;
   ap_proc_t *newproc;
   ap_procattr_t *attr;
  -ap_file_t *testfile;
  +ap_file_t *testfile, *f2;
   ap_ssize_t rv, length;
  +ap_status_t stat;
   char *buf;
   char *args[3];
  -char *teststr = "Whooo H\n";
  +char *teststr; 
   
  -fprintf(stdout, "Creating context...");
  -if (ap_create_context(NULL, NULL, &context) != APR_SUCCESS) {
  -fprintf(stderr, "Could not create context\n");
  -exit(-1);
  -}
  -fprintf(stdout, "OK\n");
  +ap_create_context(NULL, NULL, &context);
  +
  +teststr = ap_

cvs commit: apache-apr/include apr_errno.h

1999-05-26 Thread rbb
rbb 99/05/26 08:45:59

  Modified:apr/test client.c testsock.c
   apr/threadproc/unix proc.c
   include  apr_errno.h
  Log:
  Changes required to get testsock up and working again.
  
  Revision  ChangesPath
  1.7   +7 -2  apache-apr/apr/test/client.c
  
  Index: client.c
  ===
  RCS file: /home/cvs/apache-apr/apr/test/client.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- client.c  1999/05/25 17:03:53 1.6
  +++ client.c  1999/05/26 15:45:56 1.7
  @@ -70,6 +70,7 @@
   ap_socket_t *sock;
   ap_int32_t rv;
   ap_ssize_t length;
  +ap_status_t stat;
   struct timeval timeout;
   char datasend[STRLEN] = "Send data test";
   char datarecv[STRLEN];
  @@ -105,9 +106,13 @@
   fprintf(stdout, "OK\n");   
   
   fprintf(stdout, "\tClient:  Connecting to socket...");
  -if (ap_connect(sock, "localhost") != APR_SUCCESS) {
  +do {
  +stat = ap_connect(sock, "localhost");
  +} while (stat == APR_ECONNREFUSED);
  +if (stat != APR_SUCCESS) {
   ap_close_socket(sock);
  -fprintf(stderr, "Could not connect\n");
  +fprintf(stderr, "Could not connect  %d\n", stat);
  +fflush(stderr);
   exit(-1);
   }
   fprintf(stdout, "OK\n");
  
  
  
  1.11  +16 -9 apache-apr/apr/test/testsock.c
  
  Index: testsock.c
  ===
  RCS file: /home/cvs/apache-apr/apr/test/testsock.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- testsock.c1999/05/26 13:46:58 1.10
  +++ testsock.c1999/05/26 15:45:56 1.11
  @@ -58,6 +58,7 @@
   #include "apr_thread_proc.h"
   #include "apr_errno.h"
   #include "apr_general.h"
  +#include "apr_lib.h"
   
   #define STRLEN 15
   
  @@ -65,12 +66,13 @@
   {
   ap_context_t *context;
   
  -ap_procattr_t *attr1;
  -ap_procattr_t *attr2;
  -ap_proc_t *proc1;
  -ap_proc_t *proc2;
  +ap_procattr_t *attr1 = NULL;
  +ap_procattr_t *attr2 = NULL;
  +ap_proc_t *proc1 = NULL;
  +ap_proc_t *proc2 = NULL;
   ap_status_t s1;
   ap_status_t s2;
  +char *args[2];
   
   fprintf(stdout, "Creating context...");
   if (ap_create_context(NULL, NULL, &context) != APR_SUCCESS) {
  @@ -92,18 +94,23 @@
   fprintf(stderr, "Problem creating proc attrs\n");
   exit(-1);
   }
  -   
  -s1 = ap_create_process(context, "server", NULL, NULL, attr1, &proc1);
  -s2 = ap_create_process(context, "client", NULL, NULL, attr2, &proc2);
  + 
  +args[0] = ap_pstrdup(context->pool, "server");
  +args[1] = NULL; 
  +s1 = ap_create_process(context, "./server", args, NULL, attr1, &proc1);
   
  +args[0] = ap_pstrdup(context->pool, "client");
  +s2 = ap_create_process(context, "./client", args, NULL, attr2, &proc2);
  +
   if (s1 != APR_SUCCESS || s2 != APR_SUCCESS) {
   fprintf(stderr, "Problem spawning new process\n");
   exit(-1);
   }
   
  -while ((s1 = ap_wait_proc(proc1, APR_NOWAIT)) != APR_SUCCESS &&
  -   (s2 = ap_wait_proc(proc2, APR_NOWAIT)) != APR_SUCCESS)
  +while ((s1 = ap_wait_proc(proc1, APR_NOWAIT)) != APR_CHILD_DONE || 
  +   (s2 = ap_wait_proc(proc2, APR_NOWAIT)) != APR_CHILD_DONE) {
   continue;
  +}
   
   if (s1 == APR_SUCCESS) {
   ap_kill(proc2, SIGTERM);
  
  
  
  1.15  +15 -5 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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- proc.c1999/05/26 13:47:01 1.14
  +++ proc.c1999/05/26 15:45:57 1.15
  @@ -63,6 +63,7 @@
   #include 
   #include 
   #include 
  +#include 
   
   ap_status_t ap_createprocattr_init(ap_context_t *cont, struct procattr_t 
**new)
   {
  @@ -246,15 +247,24 @@
   ap_status_t ap_wait_proc(struct proc_t *proc, 
  ap_wait_how_e wait)
   {
  +pid_t stat;
   if (!proc)
   return APR_ENOPROC;
   if (wait == APR_WAIT) {
  -if (waitpid(proc->pid, NULL, WUNTRACED) > 0)
  -return APR_SUCCESS;
  +if ((stat = waitpid(proc->pid, NULL, WUNTRACED)) > 0) {
  +return APR_CHILD_DONE;
  +}
  +else if (stat == 0) {
  +return APR_CHILD_NOTDONE;
  +}
   return errno;
   }
  -if (waitpid(proc->pid, NULL, WUNTRACED | WNOHANG) > 0)
  -return APR_SUCCESS;
  -return errno;
  +if ((stat = waitpid(proc->pid, NULL, WUNTRACED | WNOHANG)) > 0) {
  +return APR_CHILD_DONE;
  +}
  +else if (stat == 0) {
  +return APR_CHILD_NOTDONE;
  +}
  +

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

1999-05-26 Thread rbb
rbb 99/05/26 10:53:07

  Modified:apr/test ab_apr.c
  Log:
  Bring ab_apr up to date with apr.
  
  Revision  ChangesPath
  1.11  +21 -17apache-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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ab_apr.c  1999/05/24 02:04:10 1.10
  +++ ab_apr.c  1999/05/26 17:53:04 1.11
  @@ -216,12 +216,14 @@
   
   static void write_request(struct connection *c)
   {
  +ap_ssize_t len = reqlen;
   gettimeofday(&c->connect, 0);
  -if (ap_send(c->aprsock, request, reqlen, 30) != reqlen) {
  +if (ap_send(c->aprsock, request, &reqlen, 30) != APR_SUCCESS &&
  +reqlen != len) {
   printf("Send request failed!\n");
   }
   if (posting) {
  -ap_send(c->aprsock, postdata, postlen, 30);
  +ap_send(c->aprsock, postdata, &postlen, 30);
   totalposted += (reqlen + postlen);
   }
   
  @@ -452,14 +454,14 @@
   c->cbx = 0;
   c->gotheader = 0;
   
  -if ((c->aprsock = ap_create_tcp_socket(cntxt)) == NULL) {
  +if (ap_create_tcp_socket(cntxt, &c->aprsock) != APR_SUCCESS) {
   err("Socket:");
   }
  -if (ap_setport(c->aprsock, port) == APR_FAILURE) {
  +if (ap_setport(c->aprsock, port) != APR_SUCCESS) {
   err("Port:");
   }
   gettimeofday(&c->start, 0);
  -if (ap_connect(c->aprsock, hostname) == APR_FAILURE) {
  +if (ap_connect(c->aprsock, hostname) != APR_SUCCESS) {
   if (errno == EINPROGRESS) {
   c->state = STATE_CONNECTING;
   ap_add_poll_socket(readbits, c->aprsock, APR_POLLOUT, 
c->socknum);
  @@ -475,7 +477,6 @@
   start_connect(c);
   }
   }
  -printf("Writing request...\n");
   /* connected first time */
   write_request(c);
   }
  @@ -527,7 +528,8 @@
   char *part;
   char respcode[4];/* 3 digits and null */
   
  -r = ap_recv(c->aprsock, buffer, sizeof(buffer), aprtimeout);
  +r = sizeof(buffer);
  +ap_recv(c->aprsock, buffer, &r, aprtimeout);
   if (r == 0 || (r < 0 && errno != EAGAIN)) {
   good++;
   close_connection(c);
  @@ -687,7 +689,7 @@
   memset(con, 0, concurrency * sizeof(struct connection));
   
   stats = malloc(requests * sizeof(struct data));
  -readbits = ap_setup_poll(cntxt, concurrency);
  +ap_setup_poll(cntxt, concurrency, &readbits);
   
   /* setup request */
   if (!posting) {
  @@ -747,7 +749,8 @@
   /* Timeout of 30 seconds. */
   timeout = 30;
   
  -n = ap_poll(readbits, concurrency, timeout);
  +n = concurrency;
  +ap_poll(readbits, &n, timeout);
   
   if (!n) {
   err("\nServer timed out\n\n");
  @@ -756,9 +759,7 @@
   err("select");
   
   for (i = 0; i < concurrency; i++) {
  -printf("rv == %d\n", rv);
  -rv = ap_get_revents(readbits, con[i].socknum);
  -printf("rv == %d\n", rv);
  +ap_get_revents(readbits, con[i].socknum, &rv);
   if ((rv & APR_POLLERR) || (rv & APR_POLLNVAL) || (rv & 
APR_POLLHUP)) {
bad++;
err_except++;
  @@ -852,24 +853,27 @@
   
   static int open_postfile(char *pfile)
   {
  -ap_file_t *postfd;
  +ap_file_t *postfd = NULL;
   int status;
   ap_fileperms_t mode;
  +ap_ssize_t length;
   
  -if ((postfd = ap_open(cntxt, pfile, APR_READ, mode)) == NULL) {
  +if (ap_open(cntxt, pfile, APR_READ, mode, &postfd) != APR_SUCCESS) {
   printf("Invalid postfile name (%s)\n", pfile);
   return errno;
   }
   
   /* No need to perform stat here, the apr_open will do it for us.  */  
   
  -postlen = ap_get_filesize(postfd);
  +ap_get_filesize(postfd, &postlen);
   postdata = malloc(postlen);
   if (!postdata) {
   printf("Can\'t alloc postfile buffer\n");
   return ENOMEM;
   }
  -if (ap_read(postfd, postdata, postlen) != postlen) {
  +length = postlen;
  +if (ap_read(postfd, postdata, &length) != APR_SUCCESS && 
  +length != postlen) {
   printf("error reading postfilen");
   return EIO;
   }
  @@ -891,7 +895,7 @@
   trstring = "";
   tdstring = "bgcolor=white";
   
  -cntxt = ap_initialize(NULL);
  +ap_create_context(NULL, NULL, &cntxt);
   
   optind = 1;
   while ((c = getopt(argc, argv, "n:c:t:T:p:v:kVhwx:y:z:")) > 0) {
  
  
  


cvs commit: apache-1.3/src/main http_protocol.c

1999-05-26 Thread coar
coar99/05/26 11:28:16

  Modified:src  CHANGES
   src/main http_protocol.c
  Log:
Make sure that redirect processing looks for the "Location"
field in both headers_out and err_headers_out.
  
  Revision  ChangesPath
  1.1363+5 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1362
  retrieving revision 1.1363
  diff -u -r1.1362 -r1.1363
  --- CHANGES   1999/05/25 10:23:15 1.1362
  +++ CHANGES   1999/05/26 18:27:43 1.1363
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3.7
   
  +  *) If a "Location" field was stored in r->err_headers_out rather
  + than r->headers_out, redirect processing wouldn't find it and
  + the server would core dump on ap_escape_html(NULL).
  + [Doug MacEachern, Ken Coar]
  +
 *) Add RULE_EXPAT, the src/lib/ directory structure, and a modified copy
of the Expat 1.0.2 distribution. [Greg Stein]
   
  
  
  
  1.268 +11 -2 apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.267
  retrieving revision 1.268
  diff -u -r1.267 -r1.268
  --- http_protocol.c   1999/05/03 15:09:07 1.267
  +++ http_protocol.c   1999/05/26 18:28:06 1.268
  @@ -2308,6 +2308,14 @@
   char *custom_response;
   const char *location = ap_table_get(r->headers_out, "Location");
   
  +/*
  + * It's possible that the Location field might be in r->err_headers_out
  + * instead of r->headers_out; use the latter if possible, else the
  + * former.
  + */
  +if (location == NULL) {
  + location = ap_table_get(r->err_headers_out, "Location");
  +}
   /* We need to special-case the handling of 204 and 304 responses,
* since they have specific HTTP requirements and do not include a
* message body.  Note that being assbackwards here is not an option.
  @@ -2359,9 +2367,10 @@
   r->err_headers_out = tmp;
   ap_clear_table(r->err_headers_out);
   
  -if (location && *location
  -&& (ap_is_HTTP_REDIRECT(status) || status == HTTP_CREATED))
  +if ((location != NULL) && *location
  +&& (ap_is_HTTP_REDIRECT(status) || status == HTTP_CREATED)) {
   ap_table_setn(r->headers_out, "Location", location);
  + }
   
   r->content_language = NULL;
   r->content_languages = NULL;
  
  
  


cvs commit: apache-apr/apr/include apr_config.h.in

1999-05-26 Thread rbb
rbb 99/05/26 13:22:33

  Modified:apr/include apr_config.h.in
  Log:
  Fix a typo.  Would cause problems later on.
  
  Revision  ChangesPath
  1.5   +1 -1  apache-apr/apr/include/apr_config.h.in
  
  Index: apr_config.h.in
  ===
  RCS file: /home/cvs/apache-apr/apr/include/apr_config.h.in,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- apr_config.h.in   1999/04/28 19:43:52 1.4
  +++ apr_config.h.in   1999/05/26 20:22:32 1.5
  @@ -115,7 +115,7 @@
   
   #ifdef HAVE_ERRNO_H
   #include 
  -#endif /* HAVE_ERRNO_H *?
  +#endif /* HAVE_ERRNO_H */
   
   #ifdef HAVE_NET_ERRNO_H
   #include 
  
  
  


cvs commit: apache-apr/apr/network_io/unix sockets.c

1999-05-26 Thread rbb
rbb 99/05/26 13:26:21

  Modified:apr/network_io/unix sockets.c
  Log:
  Should really cast this value so we can avoid warnings on some platforms.
  
  Revision  ChangesPath
  1.18  +1 -1  apache-apr/apr/network_io/unix/sockets.c
  
  Index: sockets.c
  ===
  RCS file: /home/cvs/apache-apr/apr/network_io/unix/sockets.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- sockets.c 1999/05/25 17:03:48 1.17
  +++ sockets.c 1999/05/26 20:26:17 1.18
  @@ -197,7 +197,7 @@
  
   sock->addr_len = sizeof(*sock->addr);
   
  -if ((connect(sock->socketdes, sock->addr, sock->addr_len) < 0) &&
  +if ((connect(sock->socketdes, (const struct sockaddr *)sock->addr, 
sock->addr_len) < 0) &&
   (errno != EINPROGRESS)) {
   return errno;
   }
  
  
  


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

1999-05-26 Thread rbb
rbb 99/05/26 13:39:23

  Modified:apr/test ab_apr.c
  Log:
  Casting some mallocs in ab_apr, so the AIX compiler doesn't complain about 
them
  
  Revision  ChangesPath
  1.12  +3 -3  apache-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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ab_apr.c  1999/05/26 17:53:04 1.11
  +++ ab_apr.c  1999/05/26 20:39:23 1.12
  @@ -685,10 +685,10 @@
   fflush(stdout);
   }
   
  -con = malloc(concurrency * sizeof(struct connection));
  +con = (struct connection *)malloc(concurrency * sizeof(struct 
connection));
   memset(con, 0, concurrency * sizeof(struct connection));
   
  -stats = malloc(requests * sizeof(struct data));
  +stats = (struct data *)malloc(requests * sizeof(struct data));
   ap_setup_poll(cntxt, concurrency, &readbits);
   
   /* setup request */
  @@ -866,7 +866,7 @@
   /* No need to perform stat here, the apr_open will do it for us.  */  
   
   ap_get_filesize(postfd, &postlen);
  -postdata = malloc(postlen);
  +postdata = (char *)malloc(postlen);
   if (!postdata) {
   printf("Can\'t alloc postfile buffer\n");
   return ENOMEM;
  
  
  


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

1999-05-26 Thread rbb
rbb 99/05/26 13:41:59

  Modified:apr/test Makefile.in
  Log:
  Fix the Makefile.in so ./configure actually sets it up properly.
  
  Revision  ChangesPath
  1.7   +5 -5  apache-apr/apr/test/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-apr/apr/test/Makefile.in,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Makefile.in   1999/05/20 18:01:39 1.6
  +++ Makefile.in   1999/05/26 20:41:58 1.7
  @@ -4,11 +4,11 @@
   #INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
   #LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
   
  -CC=gcc
  -RANLIB=ranlib
  -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)
  [EMAIL PROTECTED]@
  [EMAIL PROTECTED]@
  [EMAIL PROTECTED]@ @CFLAGS@ @OPTIM@ 
  [EMAIL PROTECTED]@ -lpthread -L../network_io -lnetwork -L../threadproc 
-lthreadproc -L../file_io -lfile -L../misc -lmisc -L../lib -lapr -L../time 
-ltime -L../locks -llock
  [EMAIL PROTECTED]@ $(LDLIBS)
   INCDIR=../include
   INCDIR1=../../include
   INCLUDES=-I$(INCDIR) -I$(INCDIR1) 
  
  
  


cvs commit: apache-apr/apr configure.in

1999-05-26 Thread rbb
rbb 99/05/26 13:43:44

  Modified:apr  configure.in
  Log:
  AIX will now build everything correctly with this change.
  
  Revision  ChangesPath
  1.13  +1 -1  apache-apr/apr/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/apache-apr/apr/configure.in,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- configure.in  1999/05/18 13:40:09 1.12
  +++ configure.in  1999/05/26 20:43:43 1.13
  @@ -35,7 +35,7 @@
   if (test "$SYS_SW" = "AIX"); then
   SYS_KV=`(oslevel) 2>/dev/null` || SYS_KV="0.0.0.0"
   SYS_KV=`echo $SYS_KV | awk -F. '{printf "%s%s%s", $1, $2, $3}'`
  -CFLAGS="$CFLAGS -U__STR__"
  +CFLAGS="$CFLAGS -U__STR__ -DUSE_PTHREAD_SERIALIZE -DUSE_FCNTL_SERIALIZE"
   PLATFORM="-DAIX=$SYS_KV"
   OSDIR="unix"
   case "$SYS_KV" in
  
  
  


cvs commit: apache-apr/apr/test Makefile.beos

1999-05-26 Thread rbb
rbb 99/05/26 13:45:16

  Removed: apr/test Makefile.beos
  Log:
  Removing a file that is no longer needed.