httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject [PATCH] Remove cleanups from bpushfd()
Date Sat, 01 Mar 1997 14:57:07 GMT
As discussed earlier:

Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apache/src/CHANGES,v
retrieving revision 1.180
diff -c -r1.180 CHANGES
*** CHANGES	1997/02/25 20:56:37	1.180
--- CHANGES	1997/03/01 16:08:43
***************
*** 1,3 ****
--- 1,11 ----
+ Changes with Apache 1.2b8
+ 
+   *) bpushfd() no longer notes cleanups for the file descriptors it is handed.
+      Module authors may need to adjust their code for proper cleanup to take
+      place (that is, call note_cleanups_for_fd()). This change fixes problems
+      with file descriptors being erroneously closed when the proxy module was
+      in use. [Ben Laurie]
+ 
  Changes with Apache 1.2b7
  
    *) Port to  UXP/DS(V20) [Toshiaki Nomura <nom@yk.fujitsu.co.jp>]
Index: buff.c
===================================================================
RCS file: /export/home/cvs/apache/src/buff.c,v
retrieving revision 1.22
diff -c -r1.22 buff.c
*** buff.c	1997/02/28 13:39:35	1.22
--- buff.c	1997/03/01 16:08:47
***************
*** 150,159 ****
  {
      fb->fd = fd_out;
      fb->fd_in = fd_in;
-     if(fb->fd >= 0)
- 	note_cleanups_for_fd(fb->pool,fb->fd);
-     if(fb->fd != fb->fd_in && fb->fd_in >= 0)
- 	note_cleanups_for_fd(fb->pool,fb->fd_in);
  }
  
  int
--- 150,155 ----
Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_main.c,v
retrieving revision 1.126
diff -c -r1.126 http_main.c
*** http_main.c	1997/02/28 13:58:07	1.126
--- http_main.c	1997/03/01 16:08:57
***************
*** 1725,1730 ****
--- 1725,1732 ----
  
          accept_mutex_off(); /* unlock after "accept" */
  
+ 	note_cleanups_for_fd(ptrans,csd);
+ 
          /*
           * We now have a connection, so set it up with the appropriate
           * socket options, file descriptors, and read/write buffers.
***************
*** 1748,1753 ****
--- 1750,1756 ----
  	    log_unixerr("dup", NULL, "couldn't duplicate csd", server_conf);
  	    dupped_csd = csd;   /* Oh well... */
  	}
+ 	note_cleanups_for_fd(ptrans,dupped_csd);
  #endif
  	bpushfd(conn_io, csd, dupped_csd);
  

-- 
Ben Laurie                Phone: +44 (181) 994 6435  Email: ben@algroup.co.uk
Freelance Consultant and  Fax:   +44 (181) 994 6472
Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
London, England.          Apache-SSL author

Mime
View raw message