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

1999-02-16 Thread rbb
rbb 99/02/16 08:00:50

  Modified:pthreads/src/include httpd.h
   pthreads/src/main http_config.c http_main.c
  Log:
  Removing index from listeners_rec.  This was left over from the original
  threading port, but is no longer used anywhere in the code.
  
  Revision  ChangesPath
  1.8   +0 -1  apache-apr/pthreads/src/include/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/include/httpd.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- httpd.h   1999/02/15 20:38:57 1.7
  +++ httpd.h   1999/02/16 16:00:47 1.8
  @@ -924,7 +924,6 @@
   struct sockaddr_in local_addr;   /* local IP address and port */
   int fd;
   int used;/* Only used during restart */
  -int index;
   /* more stuff here, like which protocol is bound to the port */
   };
   
  
  
  
  1.9   +0 -1  apache-apr/pthreads/src/main/http_config.c
  
  Index: http_config.c
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/main/http_config.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- http_config.c 1999/02/16 06:07:09 1.8
  +++ http_config.c 1999/02/16 16:00:48 1.9
  @@ -1450,7 +1450,6 @@
   new->local_addr.sin_addr = ap_bind_address;
   new->local_addr.sin_port = htons(s->port ? s->port : DEFAULT_HTTP_PORT);
   new->fd = -1;
  -new->index = 0;
   new->next = NULL;
   ap_listeners = new;
   }
  
  
  
  1.31  +0 -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.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- http_main.c   1999/02/16 15:34:04 1.30
  +++ http_main.c   1999/02/16 16:00:48 1.31
  @@ -1937,7 +1937,6 @@
*nr = *lr;
ap_kill_cleanups_for_socket(p, nr->fd); 
nr->next = old_listeners;
  -nr->index = 0;
nr->used = 1;
old_listeners = nr;
lr = lr->next;
  @@ -1950,7 +1949,6 @@
   listen_rec *or;
   for (or = old_listeners; or; or = or->next) {
if (!memcmp(&or->local_addr, &lr->local_addr, sizeof(or->local_addr))) {
  - or->index = 1; 
return or->fd;
}
   }
  
  
  


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

1999-02-16 Thread manoj
manoj   99/02/15 22:07:10

  Modified:pthreads/src/main http_config.c http_main.c
  Log:
  The code used to assume that a 0 fd is an error, which is not the case.
  Now, -1 is used as the error state instead (as in apache-1.3).
  
  Revision  ChangesPath
  1.8   +1 -1  apache-apr/pthreads/src/main/http_config.c
  
  Index: http_config.c
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/main/http_config.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -u -r1.7 -r1.8
  --- http_config.c 1999/02/11 16:33:04 1.7
  +++ http_config.c 1999/02/16 06:07:09 1.8
  @@ -1449,7 +1449,7 @@
   new->local_addr.sin_family = AF_INET;
   new->local_addr.sin_addr = ap_bind_address;
   new->local_addr.sin_port = htons(s->port ? s->port : DEFAULT_HTTP_PORT);
  -new->fd = NULL;
  +new->fd = -1;
   new->index = 0;
   new->next = NULL;
   ap_listeners = new;
  
  
  
  1.27  +3 -3  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.26
  retrieving revision 1.27
  diff -u -u -r1.26 -r1.27
  --- http_main.c   1999/02/15 21:04:21 1.26
  +++ http_main.c   1999/02/16 06:07:09 1.27
  @@ -1447,7 +1447,7 @@
return or->fd;
}
   }
  -return 0;
  +return -1;
   }
   
   
  @@ -1476,13 +1476,13 @@
   num_listenfds = 0;
   for (;;) {
fd = find_listener(lr);
  - if (fd == 0) {
  + if (fd < 0) {
fd = make_sock(p, &lr->local_addr);
}
else {
ap_note_cleanups_for_fd(p, fd);
}
  - if (fd) {
  + if (fd >= 0) {
   ++num_listenfds;
}
lr->fd = fd;