/[Apache-SVN]/httpd/httpd/branches/2.2.x/server/listen.c
ViewVC logotype

Log of /httpd/httpd/branches/2.2.x/server/listen.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Revision:

Revision 727769 - (view) (annotate) - [select for diffs]
Modified Thu Dec 18 17:22:54 2008 UTC (11 months, 1 week ago) by rederpj
File length: 22996 byte(s)
Diff to previous 664705 (colored)
Commit promoted backport of PR 46066.
  *) Set Listen protocol to "https" if port is set to 443 and no proto is specified
     (as documented but not implemented). PR 46066  [Dan Poirier <poirier pobox.com>]

Revision 664705 - (view) (annotate) - [select for diffs]
Modified Mon Jun 9 13:36:42 2008 UTC (17 months, 2 weeks ago) by jim
File length: 22909 byte(s)
Diff to previous 488883 (colored)
Merge r664535 from trunk:

core: Fix address-in-use startup failure on some platforms caused
by attempting to set up an IPv4 listener which overlaps with an 
existing IPv6 listener.

The failure occurred on the second pass of the open-logs hook in
a configuration such as the following:

  Listen 8080
  Listen 0.0.0.0:8081
  Listen [::]:8081

During the first pass, the two port 8081 listen recs were 
adjacent and existing logic prevented binding to 0.0.0.0:8081.
On the second pass, they were not adjacent and we then tried
to bind to 0.0.0.0:8081, leading to failure on some platforms
(seen on SLES 9 and Ubuntu 7.10, not seen on many other Unix-ish
platforms).

Leave a note about other unhandled configurations.

Submitted by: trawick
Reviewed by: jim

Revision 488883 - (view) (annotate) - [select for diffs]
Modified Wed Dec 20 02:04:39 2006 UTC (2 years, 11 months ago) by jim
File length: 22259 byte(s)
Diff to previous 483958 (colored)
Merge r487901 from trunk:

PR#37680: fix socket block/nonblock on restart/graceful
Patch submitted by Darius Davis (darius-abz free-range.com.au)

Submitted by: niq
Reviewed by: jim

Revision 483958 - (view) (annotate) - [select for diffs]
Modified Fri Dec 8 12:23:33 2006 UTC (2 years, 11 months ago) by trawick
File length: 22216 byte(s)
Diff to previous 421103 (colored)
backport simple list manipulation fix:

  *) Fix address-in-use startup failure caused by corruption of the list of
     listen sockets in some configurations with multiple generic Listen
     directives.  [Jeff Trawick]

Reviewed by: jim, wrowe  

Revision 421103 - (view) (annotate) - [select for diffs]
Modified Wed Jul 12 03:38:44 2006 UTC (3 years, 4 months ago) by fielding
File length: 22038 byte(s)
Diff to previous 396056 (colored)
update license header text

Revision 396056 - (view) (annotate) - [select for diffs]
Modified Sat Apr 22 01:53:06 2006 UTC (3 years, 7 months ago) by pquerna
File length: 21891 byte(s)
Diff to previous 395231 (colored)
Revert r395231 from the 2.2.x branch.  This gets us back to the old place with regard to the copyright statements.

Revision 395231 - (view) (annotate) - [select for diffs]
Modified Wed Apr 19 12:33:16 2006 UTC (3 years, 7 months ago) by colm
File length: 21891 byte(s)
Diff to previous 332309 (colored)
Update the last year of copyright for the 2.2.x branch

Revision 332309 - (view) (annotate) - [select for diffs]
Modified Thu Nov 10 15:20:05 2005 UTC (4 years ago) by jim
File length: 21891 byte(s)
Diff to previous 293170 (colored)
No functional change: remove trailing whitespace. This also means
that "blank" lines, which had consisted of just spaces
and/or tabs are now truly blank lines

Revision 293170 - (view) (annotate) - [select for diffs]
Modified Sun Oct 2 21:32:29 2005 UTC (4 years, 1 month ago) by colm
File length: 21901 byte(s)
Diff to previous 290179 (colored)
Sync with trunk: remove an unneccessary over-lapping variable (jorton)
and fix a style nit (colm).

Revision 290179 - (view) (annotate) - [select for diffs]
Modified Mon Sep 19 14:57:07 2005 UTC (4 years, 2 months ago) by colm
File length: 21915 byte(s)
Diff to previous 290108 (colored)
Backport r239710, r239711, r239732, r239740 and r241815 to the 2.2.x branch;
Fix PR 28167, which means we stop listening on ports when we do a
graceful-restart.


Revision 290108 - (view) (annotate) - [select for diffs]
Modified Mon Sep 19 10:55:34 2005 UTC (4 years, 2 months ago) by colm
File length: 21837 byte(s)
Diff to previous 264990 (colored)
Remove that odd strerror() call in the 2.2.x branch.


Revision 264990 - (view) (annotate) - [select for diffs]
Modified Wed Aug 31 09:46:17 2005 UTC (4 years, 2 months ago) by jorton
File length: 21866 byte(s)
Diff to previous 234103 (colored)
Merge r239381, r240092, r240096, r240349 from trunk:

* support/htcacheclean.c: Update htcacheclean defines to match
mod_disk_cache.c.

* server/listen.c (IS_INADDR_ANY, IS_IN6ADDR_ANY): New macros.
(open_listeners): Simplify using the new macros; no functional change.

* server/listen.c (open_listeners): If 0.0.0.0 is found before [::]
for the same port, switch them so that the bind to [::] is attempted
first.

* build/rpm/httpd.spec.in: Fix the RPM spec file: XML versions of the
doc files are no longer removed. Added httxt2dbm to the sbin
directory.

Submitted by: colm, jorton, minfrin
Reviewed by: colm, jorton, trawick, jerenkrantz

Revision 234103 - (view) (annotate) - [select for diffs]
Modified Sat Aug 20 18:21:45 2005 UTC (4 years, 3 months ago) by pquerna
File length: 20739 byte(s)
Diff to previous 190563 (colored)
Recreate 2.2.x branch from trunk.

Revision 190563 - (view) (annotate) - [select for diffs]
Modified Tue Jun 14 09:21:18 2005 UTC (4 years, 5 months ago) by pquerna
Original Path: httpd/httpd/trunk/server/listen.c
File length: 20739 byte(s)
Diff to previous 168411 (colored)
Merge the listen-protocol sandbox branch to trunk.

I will be adding documentation for the new directives hopefully in the next day or so.

* server/core.c: Added 'Protocol' to the core module config
                 Added ap_{set,get}_server_protocol API.
                 Added new directive: 'AcceptFilter'.
                 Enable 'httpready' by default on systems that support it.  Use dataready filters for others.

* server/listen.c: Attempt to inherit protocols from Listener Records to Server configs.
                   The 'Listen' directive can now optionally take a protocol arg
                   Move bits that determined which accept filter is applied to core.c.
                   Added bits to find the correct accept filter based on the core's configuration.

* include/{ap_listen.h,http_core.h}: Add Protocol to respective structures.

* include/http_core.h: Add the accf_map table to the core_server_config structure

* include/ap_mmn.h: Minor MMN Bump for the new interfacces.

* modules/ssl/ssl_engine_init.c: Use the new protocol framework to enable mod_ssl for 'https' websites.


Revision 168411 - (view) (annotate) - [select for diffs]
Modified Thu May 5 21:15:45 2005 UTC (4 years, 6 months ago) by pquerna
Original Path: httpd/httpd/trunk/server/listen.c
File length: 18201 byte(s)
Diff to previous 157583 (colored)
* server/listen.c: Remove the unused port parameter from open_listeners, and update the comment to reflect reality.

Revision 157583 - (view) (annotate) - [select for diffs]
Modified Tue Mar 15 20:04:58 2005 UTC (4 years, 8 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/listen.c
File length: 18328 byte(s)
Diff to previous 151408 (colored)
Add ReceiveBufferSize directive to control the TCP receive buffer.

Submitted by: Eric Covener <covener gmail.com>
Reviewed by:  Justin Erenkrantz (with minor formatting tweaks)

Revision 151408 - (view) (annotate) - [select for diffs]
Modified Fri Feb 4 20:28:49 2005 UTC (4 years, 9 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/listen.c
File length: 17282 byte(s)
Diff to previous 111596 (colored)
Update copyright year to 2005 and standardize on current copyright owner line.

Revision 111596 - (view) (annotate) - [select for diffs]
Modified Sat Dec 11 09:53:16 2004 UTC (4 years, 11 months ago) by pquerna
Original Path: httpd/httpd/trunk/server/listen.c
File length: 17246 byte(s)
Diff to previous 109498 (colored)
* Add bits to use APR_TCP_DEFER_ACCEPT
* Log Warnings when adding defer accept or an accept filter fails.

Revision 109498 - (view) (annotate) - [select for diffs]
Modified Thu Dec 2 13:28:04 2004 UTC (4 years, 11 months ago) by jorton
Original Path: httpd/httpd/trunk/server/listen.c
File length: 16700 byte(s)
Diff to previous 106988 (colored)
Fix gcc "no previous prototype" warnings after reorganisation:

* server/core_filters.c (ap_core_input_filter, ap_core_output_filter,
ap_net_time_filter): Renamed to add ap_ prefixes for global symbols.

* include/ap_listen.h: Don't export ap_listen_open at all, it's not
used outside server/listen.c any more.

* server/listen.c (open_listeners): Renamed from ap_listen_open.

Revision 106988 - (view) (annotate) - [select for diffs]
Modified Tue Nov 30 06:29:56 2004 UTC (4 years, 11 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/listen.c
File length: 16444 byte(s)
Diff to previous 106843 (colored)
Declare the ap_set_listen* functions with AP_DECLARE_NONSTD for Win32 support.

(I think this is what is needed for Win32, but I'm not quite sure.)

Revision 106843 - (view) (annotate) - [select for diffs]
Modified Sun Nov 28 19:37:41 2004 UTC (4 years, 11 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/listen.c
File length: 16193 byte(s)
Diff to previous 106103 (colored)
Properly export ap_listen_* functions.

* server/listen.c: Add AP_DECLARE as appropriate.
* include/ap_listen.h: Add AP_DECLARE as appropriate.

Revision 106103 - (view) (annotate) - [select for diffs]
Modified Sun Nov 21 18:50:36 2004 UTC (5 years ago) by nd
Original Path: httpd/httpd/trunk/server/listen.c
File length: 16109 byte(s)
Diff to previous 103030 (colored)
general property cleanup

Revision 103030 - (view) (annotate) - [select for diffs]
Modified Fri Mar 19 11:19:37 2004 UTC (5 years, 8 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 16109 byte(s)
Diff to previous 103029 (colored)
Fix crash when Apache was started with no Listen directives.

Submitted by: Michael Corcoran <mcorcoran warpsolutions.com>
Reviewed by:  Jeff Trawick

Revision 103029 - (view) (annotate) - [select for diffs]
Modified Fri Mar 19 11:16:03 2004 UTC (5 years, 8 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 16093 byte(s)
Diff to previous 102619 (colored)
  *) SECURITY: CAN-2004-0174 (cve.mitre.org)
     Fix starvation issue on listening sockets where a short-lived
     connection on a rarely-accessed listening socket will cause a
     child to hold the accept mutex and block out new connections until
     another connection arrives on that rarely-accessed listening socket.
     With Apache 2.x there is no performance concern about enabling the
     logic for platforms which don't need it, so it is enabled everywhere
     except for Win32.  [Jeff Trawick]

(already in 2.0.49, propagating to mirrors now)

Revision 102619 - (view) (annotate) - [select for diffs]
Modified Mon Feb 9 20:40:53 2004 UTC (5 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/listen.c
File length: 15282 byte(s)
Diff to previous 102589 (colored)
fix name of The Apache Software Foundation

Revision 102589 - (view) (annotate) - [select for diffs]
Modified Sun Feb 8 13:58:22 2004 UTC (5 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/listen.c
File length: 15278 byte(s)
Diff to previous 102525 (colored)
fix copyright dates according to the first check in

Revision 102525 - (view) (annotate) - [select for diffs]
Modified Fri Feb 6 22:58:42 2004 UTC (5 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/listen.c
File length: 15278 byte(s)
Diff to previous 102495 (colored)
apply Apache License, Version 2.0

Revision 102495 - (view) (annotate) - [select for diffs]
Modified Wed Feb 4 14:12:06 2004 UTC (5 years, 9 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 17497 byte(s)
Diff to previous 102135 (colored)
FreeBSD: Use the httpready accept filter instead of dataready on
newer levels of the OS.

Submitted by: Paul Querna <chip force-elite.com>
Reviewed by:  Jeff Trawick

Revision 102135 - (view) (annotate) - [select for diffs]
Modified Thu Jan 1 13:26:26 2004 UTC (5 years, 10 months ago) by nd
Original Path: httpd/httpd/trunk/server/listen.c
File length: 17326 byte(s)
Diff to previous 101991 (colored)
update license to 2004.

Revision 101991 - (view) (annotate) - [select for diffs]
Modified Fri Dec 5 00:59:29 2003 UTC (5 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 17326 byte(s)
Diff to previous 101338 (colored)
stop using apr_sockaddr_port_get() accessor function, as it will
disappear from APR 1.0 API shortly

Revision 101338 - (view) (annotate) - [select for diffs]
Modified Sun Sep 28 16:30:43 2003 UTC (6 years, 1 month ago) by jwoolley
Original Path: httpd/httpd/trunk/server/listen.c
File length: 17343 byte(s)
Diff to previous 101154 (colored)
Setting lr = NULL on line 399 leads the the loop
closing early (see line 343) and the ap_listeners list being
nonsense.

End result is a segfault if something is already listening on ::
on our port when httpd is started.

Submitted by:	Colm MacCarthaigh <colm@stdlib.net>

Revision 101154 - (view) (annotate) - [select for diffs]
Modified Wed Sep 3 19:27:12 2003 UTC (6 years, 2 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 17030 byte(s)
Diff to previous 101096 (colored)
switch to APR 1.0 API (which is still in flux)

because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
2.1-dev won't build with apr and apr-util's 0.9 branch anymore

Revision 101096 - (view) (annotate) - [select for diffs]
Modified Mon Aug 25 16:00:49 2003 UTC (6 years, 3 months ago) by jorton
Original Path: httpd/httpd/trunk/server/listen.c
File length: 17013 byte(s)
Diff to previous 101083 (colored)
* listen.c (ap_listen_open): Avoid casts when checking for :: and
0.0.0.0 to fix build on FreeBSD 4.2, and fix logic.

Reviewed by: Colm MacCarthaigh

Revision 101083 - (view) (annotate) - [select for diffs]
Modified Sun Aug 24 22:43:36 2003 UTC (6 years, 3 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/listen.c
File length: 17011 byte(s)
Diff to previous 100999 (colored)
Fixup IPv6 Listen statements on Linux by attempting to bind in the order
that getaddrinfo() returned to us and skipping binding to IPv4 addresses
if the previous bind was to an IPv6 of the same address and port.

Justin made some style changes, added a (struct in6_addr*) to make it compile
on *BSD as well as an attempt to make the addition of the listener to the list
a little more efficient.

Submitted by:	Colm MacCarthaigh <colm@stdlib.net>
Reviewed by:	Justin Erenkrantz

Revision 100999 - (view) (annotate) - [select for diffs]
Modified Fri Aug 15 02:25:41 2003 UTC (6 years, 3 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/listen.c
File length: 14346 byte(s)
Diff to previous 100994 (colored)
Change Listen directive to bind to all addresses returned by
apr_sockaddr_info_get when a hostname is not specified.

Revision 100994 - (view) (annotate) - [select for diffs]
Modified Thu Aug 14 00:05:26 2003 UTC (6 years, 3 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/listen.c
File length: 14133 byte(s)
Diff to previous 100978 (colored)
More fun with IPv6 Listen statements.

- Remove the default_family declaration as it is no longer used.
- Fix segfault if checking NULL sa->hostname.
- Cycle through the bind_addr list if we get an error creating an IPv6 socket
  and we're IPv6 enabled and the binding address is NULL.  The odds are that
  we just can't support IPv6.  (The twist is that apr_sockaddr_info_get should
  return bind_addr's for IPv6 and IPv4.  This strikes me as slightly more
  elegant than the find_default_family hack.)

This should get us working on Linux and Netware again.

Revision 100978 - (view) (annotate) - [select for diffs]
Modified Wed Aug 13 19:17:45 2003 UTC (6 years, 3 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/listen.c
File length: 13635 byte(s)
Diff to previous 99130 (colored)
Correct failure with Listen directives on machines with IPv6 enabled by
removing find_default_family() and letting APR determine what should be done
without a hostname.

This patch requires the corollary APR patch to properly call getaddrinfo().

(Justin modified Colm's patch to always walk the old listeners even when
we have an address.  That part of the patch wasn't really relevant.)

Submitted by:	Colm MacC�rthaigh <colm@stdlib.net>
Reviewed by:	Justin Erenkrantz

Revision 99130 - (view) (annotate) - [select for diffs]
Modified Mon Mar 31 04:30:38 2003 UTC (6 years, 7 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/listen.c
File length: 15067 byte(s)
Diff to previous 98573 (colored)
  Quit registering *two* cleanups listening sockets prior to exec.
  We open them once, register a cleanup only once.

Submitted by:	Jeff Trawick
Reviewed by:	FirstBill, OtherBill

Revision 98573 - (view) (annotate) - [select for diffs]
Modified Mon Feb 3 17:53:28 2003 UTC (6 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/listen.c
File length: 14593 byte(s)
Diff to previous 97595 (colored)
finished that boring job:
update license to 2003.

Happy New Year! ;-))

Revision 97595 - (view) (annotate) - [select for diffs]
Modified Fri Nov 22 12:23:10 2002 UTC (7 years ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 14593 byte(s)
Diff to previous 97516 (colored)
Fix critical bug in new --enable-v4-mapped configure option
implementation which broke IPv4 listening sockets on
systems with IPV6_V6ONLY socket option.

That option should only be done on IPv6 listening sockets.

Submitted by:	hiroyuki hanai <hanai@imgsrc.co.jp>]
Reviewed by:	Jeff Trawick

Revision 97516 - (view) (annotate) - [select for diffs]
Modified Thu Nov 14 14:17:11 2002 UTC (7 years ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 14501 byte(s)
Diff to previous 96258 (colored)
Add --[enable|disable]-v4-mapped configure option to control
whether or not Apache expects to handle IPv4 connections
on IPv6 listening sockets.  Either setting will work on
systems with the IPV6_V6ONLY socket option.  --enable-v4-mapped
must be used on systems that always allow IPv4 connections on
IPv6 listening sockets.

Note: As the ssl config file is not automatically generated and
      it is expected to require editing anyway to work, the only
      change there was to suggest the required Listen statements
      in a comment.

PR:   PR 14037 (Bugzilla), PR 7492 (Gnats), various dups of these PRs

Revision 96258 - (view) (annotate) - [select for diffs]
Modified Wed Jul 31 12:44:55 2002 UTC (7 years, 3 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 13967 byte(s)
Diff to previous 96237 (colored)
Restore the ability to specify host names on Listen directives.
We needed to compare on the value we pass to apr_sockaddr_info_get(),
not the IP address string.  Sometimes this is an IP address string
and sometimes it is a host name.  Otherwise, on the second pass
through this code we won't find the existing listen_rec for a Listen
directive which had a host name, and we'll create a new listen_rec
and try to bind again to the same addr/port.

PR:                  11030
Helped immensely by: David Shane Holden <dpejesh@yahoo.com>,
                     who debugged it and submitted a patch which
                     showed the problem; a much simpler change was
                     committed though

Revision 96237 - (view) (annotate) - [select for diffs]
Modified Tue Jul 30 14:52:12 2002 UTC (7 years, 3 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 14028 byte(s)
Diff to previous 96057 (colored)
When deciding on the default address family for listening sockets,
make sure we can actually bind to an AF_INET6 socket before
deciding that we should default to AF_INET6.  This fixes a startup
problem on certain levels of OpenUNIX.

PR:        10235

Revision 96057 - (view) (annotate) - [select for diffs]
Modified Mon Jul 15 08:05:11 2002 UTC (7 years, 4 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/listen.c
File length: 13569 byte(s)
Diff to previous 94566 (colored)
  http occurances to update for apr_socket_opt_get/set

Revision 94566 - (view) (annotate) - [select for diffs]
Modified Tue Apr 9 06:48:31 2002 UTC (7 years, 7 months ago) by aaron
Original Path: httpd/httpd/trunk/server/listen.c
File length: 13537 byte(s)
Diff to previous 94358 (colored)
Remove unnecessary includes of apr_lock.h

Revision 94358 - (view) (annotate) - [select for diffs]
Modified Mon Apr 1 12:53:09 2002 UTC (7 years, 7 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 13559 byte(s)
Diff to previous 94048 (colored)
Don't allow initialization to succeed if we can't get a socket
corresponding to one of the Listen statements.

Revision 94048 - (view) (annotate) - [select for diffs]
Modified Wed Mar 20 07:03:07 2002 UTC (7 years, 8 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/listen.c
File length: 13497 byte(s)
Diff to previous 93924 (colored)
  Here's the patch that really sucks.  old_listeners points to an array
  of apr_socket objects already destroyed by their cleanups, and in any
  case they now live in invalid memory.  Extend their lifetimes.

  This implies that the process pool grows on every restart for no good
  reason.  One possible solution is to let the old pconf survive until
  the new pconf is alive.  Another is to create the listeners in a subpool
  of process->pool, destroyed after the old_listeners are closed.

  Either which way, a better solution exists, but this closes the immediate
  bug.  [How haven't we been segfaulting in unix on restarts before this
  patch, gurus?]

Revision 93924 - (view) (annotate) - [select for diffs]
Modified Thu Mar 14 04:06:02 2002 UTC (7 years, 8 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/listen.c
File length: 13537 byte(s)
Diff to previous 93918 (colored)
  Our ap_listeners were binding to IIS sockets, other Apache instances'
  listeners, the bottoms of peoples' shoes, etc.

  Wait to set SO_REUSEADDR on Win32 until the parent is certain the
  port is all ours.

Revision 93918 - (view) (annotate) - [select for diffs]
Modified Wed Mar 13 20:48:07 2002 UTC (7 years, 8 months ago) by fielding
Original Path: httpd/httpd/trunk/server/listen.c
File length: 12596 byte(s)
Diff to previous 93884 (colored)
Update our copyright for this year.

Revision 93884 - (view) (annotate) - [select for diffs]
Modified Tue Mar 12 23:15:54 2002 UTC (7 years, 8 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 12596 byte(s)
Diff to previous 93774 (colored)
simplify the way we find the family of an apr_sockaddr_t

Revision 93774 - (view) (annotate) - [select for diffs]
Modified Thu Mar 7 20:03:02 2002 UTC (7 years, 8 months ago) by striker
Original Path: httpd/httpd/trunk/server/listen.c
File length: 12607 byte(s)
Diff to previous 93717 (colored)
Torch a stale commented out line.

Revision 93717 - (view) (annotate) - [select for diffs]
Modified Tue Mar 5 20:43:24 2002 UTC (7 years, 8 months ago) by ianh
Original Path: httpd/httpd/trunk/server/listen.c
File length: 12629 byte(s)
Diff to previous 93252 (colored)
Sander's Stylistic Submission
(de-tab)
PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 93252 - (view) (annotate) - [select for diffs]
Modified Tue Feb 5 12:52:01 2002 UTC (7 years, 9 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 12498 byte(s)
Diff to previous 93248 (colored)
restore the SO_REUSEADDR for listening sockets; it is absolutely
required on most (all?) platforms, regardless of what code changes
might be required to work around the ability on Windows to
inadvertently have more than one server listening on the same ports

Revision 93248 - (view) (annotate) - [select for diffs]
Modified Tue Feb 5 06:16:04 2002 UTC (7 years, 9 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 12152 byte(s)
Diff to previous 93224 (colored)
This change keeps the server from allowing multiple instances to bind to
the same port.  Previously, this was necessary, because the Windows MPM
was binding to the socket in both the parent and child.  Today's code
passes the attached socket to the child from the parent, so we don't need
to re-attach in the child.

Revision 93224 - (view) (annotate) - [select for diffs]
Modified Mon Feb 4 16:58:54 2002 UTC (7 years, 9 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 12498 byte(s)
Diff to previous 93102 (colored)
This patch allows the prefork MPM to print messages to the console if it
can't open a socket for some reason.

Revision 93102 - (view) (annotate) - [select for diffs]
Modified Wed Jan 30 12:32:07 2002 UTC (7 years, 9 months ago) by bjh
Original Path: httpd/httpd/trunk/server/listen.c
File length: 12470 byte(s)
Diff to previous 92711 (colored)
Remove more spmt_os2 MPM leftovers.

Revision 92711 - (view) (annotate) - [select for diffs]
Modified Wed Jan 2 23:27:57 2002 UTC (7 years, 10 months ago) by bnicholes
Original Path: httpd/httpd/trunk/server/listen.c
File length: 12504 byte(s)
Diff to previous 92387 (colored)
Making sure that the global variables have been initialized to avoid linker
problems at least on NetWare
Submitted by: Pavel Novy

Revision 92387 - (view) (annotate) - [select for diffs]
Modified Sat Dec 8 01:38:05 2001 UTC (7 years, 11 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/listen.c
File length: 12497 byte(s)
Diff to previous 92386 (colored)
Fix segfault when restarting worker MPM.  We can not examine the POD as
a normal listener.

There was an additional bug than what Ian submitted to fix listen.c
(i.e. check sa for null): make_pipe_of_death does not zero out
lr->bind_addr (since it uses apr_palloc).  So, on Solaris, the first
time through, bind_addr was probably 0, but the second time, not (pools!).
(This caused Aaron's analysis that the patch worked the first time,
but not the second time.)

Submitted by:	Ian Holsman
Reviewed by:	Justin Erenkrantz, Aaron Bannert

Revision 92386 - (view) (annotate) - [select for diffs]
Modified Sat Dec 8 01:22:00 2001 UTC (7 years, 11 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/listen.c
File length: 12352 byte(s)
Diff to previous 91916 (colored)
Clean up style (tabs->spaces, etc, etc, etc.).

Revision 91916 - (view) (annotate) - [select for diffs]
Modified Tue Nov 13 22:42:38 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11939 byte(s)
Diff to previous 91494 (colored)
Allow modules that add sockets to the ap_listeners list to
define the function that should be used to accept on that
socket.  Each MPM can define their own function to use for
the accept function with the MPM_ACCEPT_FUNC macro.  This
also abstracts out all of the Unix accept error handling
logic, which has become out of synch across Unix MPMs.

The code flow is much easier now for different transports:

1)  During pre-config, post-config or while parsing the config
    file, add a socket to the ap_listeners list, making sure to
    define an accept function at the same time.

2)  MPMs find the correct listener, and call the accept function
    that was defined in step 1.

3)  That accept function returns a void pointer, which is passed
    to the create_connection hook.

4)  create_connection adds the correct low-level filters.

Revision 91494 - (view) (annotate) - [select for diffs]
Modified Tue Oct 16 18:45:16 2001 UTC (8 years, 1 month ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11828 byte(s)
Diff to previous 91293 (colored)
Exit when we can't listen on any of the configured ports.  This
is the same behavior as 1.3, and it avoids having the MPMs to
deal with bogus ap_listen_rec structures.

This also backs out some circumventions I and Greg Ames had added
to prefork; these are no longer necessary because of this change.

Revision 91293 - (view) (annotate) - [select for diffs]
Modified Thu Oct 4 20:00:53 2001 UTC (8 years, 1 month ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11734 byte(s)
Diff to previous 90132 (colored)
Remove the Port directive.  In it's place, the Listen directive
is now a required directive, which tells Apache what port to
listen on.  The ServerName directive has also been extended
to accept an optional port.  If the port is specified to the
ServerName, the server will report that port whenever it
reports the port that it is listening on.  This change was
made to ease configuration errors that stem from having a Port
directive, and a Listen directive.  In that situation, the server
would only listen to the port specified by the Listen command,
which caused a lot of confusion to users.

Revision 90132 - (view) (annotate) - [select for diffs]
Modified Mon Aug 13 04:57:35 2001 UTC (8 years, 3 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11737 byte(s)
Diff to previous 90131 (colored)
Begin to sanitize the MPM configuration directives.  Now, all
MPMs use the same functions for all common MPM directives.  This
should make it easier to catch all bugs in these directives once.

Everybody should check their favorite MPM to ensure that it still
compiles, and that these directives work.  This is a big patch, and
although it looks good, and things compiled for me, that is no
garauntee that it will work on all platforms.  :-)

Submitted by:	Cody Sherr <csherr@covalent.net>

Revision 90131 - (view) (annotate) - [select for diffs]
Modified Mon Aug 13 04:25:43 2001 UTC (8 years, 3 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11716 byte(s)
Diff to previous 89730 (colored)
Close a major resource leak.  Everytime we had issued a
graceful restart, we leaked a socket descriptor.

The listening sockets should not be set inheritable, at least
not at this point.  We only want some of the httpd children to
inherit the socket.  Namely, those that will be actually serving
requests.  Any other child process (piped logs), should not be
inheriting the sockets.

PR:	7891

Revision 89730 - (view) (annotate) - [select for diffs]
Modified Thu Jul 26 16:36:40 2001 UTC (8 years, 4 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11753 byte(s)
Diff to previous 89708 (colored)
  Terniaries are broken under MSVC, they never did resolve how to resolve
  the type of an obvious conversion like this one.  Even casting the const
  to an apr_port_t doesn't solve it.

Revision 89708 - (view) (annotate) - [select for diffs]
Modified Wed Jul 25 17:59:37 2001 UTC (8 years, 4 months ago) by jwoolley
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11739 byte(s)
Diff to previous 89594 (colored)
PR:

Revision 89594 - (view) (annotate) - [select for diffs]
Modified Wed Jul 18 17:14:09 2001 UTC (8 years, 4 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11742 byte(s)
Diff to previous 89593 (colored)
  Omitted the arg

Revision 89593 - (view) (annotate) - [select for diffs]
Modified Wed Jul 18 17:13:01 2001 UTC (8 years, 4 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11735 byte(s)
Diff to previous 89592 (colored)
  rbb's names still need work :)

Revision 89592 - (view) (annotate) - [select for diffs]
Modified Wed Jul 18 16:56:55 2001 UTC (8 years, 4 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11735 byte(s)
Diff to previous 89557 (colored)
  Changes to back out inherit flag from apr_os_sock_make()
  and apr_socket_create()

Revision 89557 - (view) (annotate) - [select for diffs]
Modified Mon Jul 16 16:11:05 2001 UTC (8 years, 4 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11731 byte(s)
Diff to previous 88733 (colored)
Added an inherit flag to apr_socket_create and other socket creation
functions.  This allows APR programs to specify that a socket should
be passed to any child processes that are created.  The inherit flag
is only meaningful if programs use apr_process_create().  This
also adds a couple of macros that allow APR types to set and unset
the inherit flag.

This also fixes Apache to use the new API.

Revision 88733 - (view) (annotate) - [select for diffs]
Modified Thu Apr 5 19:04:14 2001 UTC (8 years, 7 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11706 byte(s)
Diff to previous 88690 (colored)
Now that APR knows when TCP_NODELAY is inherited, use its setting to
know when to set that option on the listening socket.

(not that I understand to start with why we bother saving this minimal
pathlength when it isn't inherited)

Revision 88690 - (view) (annotate) - [select for diffs]
Modified Tue Apr 3 15:06:13 2001 UTC (8 years, 7 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11704 byte(s)
Diff to previous 88498 (colored)
Add the code to actually enable accept filters in 2.0

Revision 88498 - (view) (annotate) - [select for diffs]
Modified Mon Mar 12 17:29:02 2001 UTC (8 years, 8 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11536 byte(s)
Diff to previous 88482 (colored)
  *) Reimplement the Windows MPM (mpm_winnt.c) to eliminate calling
     DuplicateHandle on an IOCompletionPort (a practice which
     MS "discourages"). The new model does not rely on associating
     the completion port with the listening sockets, thus the
     completion port can be completely managed within the child
     process.  A dedicated thread accepts connections off the network,
     then calls PostQueuedCompletionStatus() to wake up worker
     threads blocked on the completion port.
     [Bill Stoddard]

Revision 88482 - (view) (annotate) - [select for diffs]
Modified Fri Mar 9 18:28:55 2001 UTC (8 years, 8 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11582 byte(s)
Diff to previous 88184 (colored)
Fix a Windows seg fault on startup when multiple listen directives are being used.

The pool pointer in the local address field in apr_sock_t is not initialized until a
request is received.  in general, we should not rely on the addressed in apr_sock_t
when doing work on the listen_recs.

Revision 88184 - (view) (annotate) - [select for diffs]
Modified Fri Feb 16 04:26:53 2001 UTC (8 years, 9 months ago) by fielding
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11729 byte(s)
Diff to previous 88061 (colored)
Update copyright to 2001

Revision 88061 - (view) (annotate) - [select for diffs]
Modified Sat Feb 10 14:04:21 2001 UTC (8 years, 9 months ago) by gstein
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11724 byte(s)
Diff to previous 88019 (colored)
*) continued header revamping
*) torch some headers (and some libs) from the autoconf stuff

Revision 88019 - (view) (annotate) - [select for diffs]
Modified Thu Feb 8 07:45:33 2001 UTC (8 years, 9 months ago) by dougm
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11723 byte(s)
Diff to previous 87601 (colored)
renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 87601 - (view) (annotate) - [select for diffs]
Modified Sun Jan 7 05:51:23 2001 UTC (8 years, 10 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11673 byte(s)
Diff to previous 87565 (colored)
Stop leaking sockets.  This is a minimal leak, but it was there.
Basically, we were creating a socket_t, but never assigning a port or
IP address to it.  We then re-read the config file, and search the
list of allocated sockets for the socket that we have already allocated
for this port, but we never find the port and address, because we never
stored them in the socket_t.  This was keeping the Listen directive from
working properly.

Revision 87565 - (view) (annotate) - [select for diffs]
Modified Tue Jan 2 01:34:05 2001 UTC (8 years, 10 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11568 byte(s)
Diff to previous 87388 (colored)
Modify a couple of calls to ap_log_error with a NULL server to use
ap_log_perror, and pass a pool.  The keeps us from seg faulting if the
error log hasn't been opened yet.

Revision 87388 - (view) (annotate) - [select for diffs]
Modified Sun Dec 17 17:47:03 2000 UTC (8 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 11558 byte(s)
Diff to previous 87386 (colored)
When the platform supports IPv6 (according to APR) and
the system is configured to support IPv6, Apache gets IPv6
listening sockets unless the Listen statement says otherwise
(i.e., Listen specifies an IPv4 numeric address string or a
hostname which resolves to an IPv4 address).

Revision 87386 - (view) (annotate) - [select for diffs]
Modified Sun Dec 17 12:30:29 2000 UTC (8 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 12051 byte(s)
Diff to previous 87371 (colored)
Call ap_log_error() instead of ap_log_rerror() from alloc_listener().
This bug, introduced in a recent commit, caused a segfault when the
hostname couldn't be resolved.

Revision 87371 - (view) (annotate) - [select for diffs]
Modified Sat Dec 16 14:49:18 2000 UTC (8 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 12074 byte(s)
Diff to previous 87369 (colored)
tweak the responsibilities of make_sock() and alloc_listener()
because we need to resolve the hostname (i.e., call apr_getaddrinfo())
before creating the socket so that we get a socket of the appropriate
family

also, simplify some of the address displays in some error logs

Revision 87369 - (view) (annotate) - [select for diffs]
Modified Sat Dec 16 12:21:21 2000 UTC (8 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 10779 byte(s)
Diff to previous 87207 (colored)
use apr_parse_addr_port() in ap_set_listener(); this allows IPv6
numeric address strings to be specified (though we wouldn't get
an IPv6 socket for it at the moment)

consolidate the use of APR_ANYADDR and make a note about its
protocol dependence

Revision 87207 - (view) (annotate) - [select for diffs]
Modified Tue Dec 5 13:54:11 2000 UTC (8 years, 11 months ago) by bjh
Original Path: httpd/httpd/trunk/server/listen.c
File length: 10683 byte(s)
Diff to previous 87134 (colored)
Include mpm.h so that we know which MPM is being built and therefore
when to export ap_listen_open().

Revision 87134 - (view) (annotate) - [select for diffs]
Modified Wed Nov 29 20:50:39 2000 UTC (8 years, 11 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 10666 byte(s)
Diff to previous 87050 (colored)
Remove an unused header

Revision 87050 - (view) (annotate) - [select for diffs]
Modified Tue Nov 21 19:10:25 2000 UTC (9 years ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 10683 byte(s)
Diff to previous 87024 (colored)
updates to changed interfaces to apr_set_port(), apr_get_port(),
apr_set_ipaddr(), and apr_get_ipaddr()

Revision 87024 - (view) (annotate) - [select for diffs]
Modified Sun Nov 19 14:24:20 2000 UTC (9 years ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 10593 byte(s)
Diff to previous 86892 (colored)
Change apr_bind() to take apr_sockaddr_t.

Revision 86892 - (view) (annotate) - [select for diffs]
Modified Thu Nov 9 19:38:26 2000 UTC (9 years ago) by stoddard
Original Path: httpd/httpd/trunk/server/listen.c
File length: 10177 byte(s)
Diff to previous 86890 (colored)
Clean up compiler warnings

Revision 86890 - (view) (annotate) - [select for diffs]
Modified Thu Nov 9 15:09:50 2000 UTC (9 years ago) by dreid
Original Path: httpd/httpd/trunk/server/listen.c
File length: 10177 byte(s)
Diff to previous 86870 (colored)
Change the code to reflect the recent API changes...
Alter http_vhost.c to use the new apr_get_inaddr fucntion.  Old code is still
there just in case it breaks.  can someone check it who knows this stuff?

Revision 86870 - (view) (annotate) - [select for diffs]
Modified Wed Nov 8 14:47:33 2000 UTC (9 years ago) by dreid
Original Path: httpd/httpd/trunk/server/listen.c
File length: 10160 byte(s)
Diff to previous 86866 (colored)
This adds the APR_LOCAL/APR_REMOTE to APR and changes the apr_get/set_port
functions to use it.  This is onyl the start and I'll pause a while before
I continue in case people really hate this.  The patch can be backed out and
all evidence will be removed, but I think this makes maintaining/developing
the code easier in the long term.

Revision 86866 - (view) (annotate) - [select for diffs]
Modified Wed Nov 8 11:35:38 2000 UTC (9 years ago) by dreid
Original Path: httpd/httpd/trunk/server/listen.c
File length: 10144 byte(s)
Diff to previous 86441 (colored)
Start of moving to apr_port_t in the server code.  This will probably the first
of a few...

Revision 86441 - (view) (annotate) - [select for diffs]
Modified Sun Oct 8 04:02:11 2000 UTC (9 years, 1 month ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 10148 byte(s)
Diff to previous 86179 (colored)
Add back the ap_disable_nagle call in make_sock.  However, this is a
performance enhancement only on platforms where turning off nagle is
inherited by accepted sockets.  Because this is not always true, in order
to have the disable_nagle call active, the macro DISABLE_NAGLE_INHERITED
must be defined.
PR:	6531

Revision 86179 - (view) (annotate) - [select for diffs]
Modified Fri Sep 8 14:59:46 2000 UTC (9 years, 2 months ago) by gregames
Original Path: httpd/httpd/trunk/server/listen.c
File length: 10058 byte(s)
Diff to previous 85976 (colored)
Change prefork to use the same listen api as the rest of the unix mpms
(ap_setup_listeners).  This eliminates the need to force a recompile of
listen.c when you switch to/from using prefork.

Revision 85976 - (view) (annotate) - [select for diffs]
Modified Wed Aug 2 05:27:38 2000 UTC (9 years, 3 months ago) by dougm
Original Path: httpd/httpd/trunk/server/listen.c
File length: 10108 byte(s)
Diff to previous 85867 (colored)
prefix libapr functions and types with apr_

Revision 85867 - (view) (annotate) - [select for diffs]
Modified Fri Jul 21 19:50:58 2000 UTC (9 years, 4 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 10077 byte(s)
Diff to previous 85856 (colored)
Move all APR functions related to strings to their own directory, and
create a new header for those functions.  This is the first step to
removing the apr/lib directory completely, and moving those files/functions
to descriptive directories.

Revision 85856 - (view) (annotate) - [select for diffs]
Modified Sun Jul 16 07:12:42 2000 UTC (9 years, 4 months ago) by bjh
Original Path: httpd/httpd/trunk/server/listen.c
File length: 10052 byte(s)
Diff to previous 85832 (colored)
OS/2: Put back creation of listeners in main thread in spmt_os2 MPM.

Revision 85832 - (view) (annotate) - [select for diffs]
Modified Thu Jul 13 16:05:07 2000 UTC (9 years, 4 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 10026 byte(s)
Diff to previous 85809 (colored)
Fix the prefork MPM to make it compile and work again out-of-the-box.

Revision 85809 - (view) (annotate) - [select for diffs]
Modified Mon Jul 10 21:37:23 2000 UTC (9 years, 4 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9947 byte(s)
Diff to previous 85599 (colored)
Move setup_listeners to listen.c.  This renames it to ap_setup_listeners,
and removes the duplicated code from all effected MPMs.  The only this
doesn't touch, is Windows.  That MPM was using a different setup_listeners.
If one of the Windows guys would like to modify the WinNT MPM to use the
same setup_lsiteners, that would be VERY cool.

Revision 85599 - (view) (annotate) - [select for diffs]
Modified Sat Jun 17 16:29:53 2000 UTC (9 years, 5 months ago) by ben
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9631 byte(s)
Diff to previous 85558 (colored)
More consification, correct command initialisation.

Revision 85558 - (view) (annotate) - [select for diffs]
Modified Mon Jun 12 23:03:05 2000 UTC (9 years, 5 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9569 byte(s)
Diff to previous 84963 (colored)
Protect system header files with the appropriate macros.

Revision 84963 - (view) (annotate) - [select for diffs]
Modified Fri Apr 14 15:59:20 2000 UTC (9 years, 7 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9541 byte(s)
Diff to previous 84878 (colored)
Change ap_context_t to ap_pool_t.  This compiles, runs, and serves pages
on Linux, but probably breaks somewhere.

Revision 84878 - (view) (annotate) - [select for diffs]
Modified Fri Mar 31 08:44:21 2000 UTC (9 years, 7 months ago) by fielding
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9547 byte(s)
Diff to previous 84823 (colored)
Update to Apache Software License version 1.1

Revision 84823 - (view) (annotate) - [select for diffs]
Modified Wed Mar 22 10:37:28 2000 UTC (9 years, 8 months ago) by trawick
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9692 byte(s)
Diff to previous 84725 (colored)
change the error message logged for a bind() failure so that
it shows the interface and port number; it is now very similar
to the error message used in 1.3

Revision 84725 - (view) (annotate) - [select for diffs]
Modified Fri Mar 10 00:07:37 2000 UTC (9 years, 8 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9594 byte(s)
Diff to previous 84531 (colored)
Fix all the License issues.  Including:
s/Apache Group/Apache Software Foundation/
s/1999/2000/
s/Sascha's license/ASF license

Revision 84531 - (view) (annotate) - [select for diffs]
Modified Fri Jan 28 18:02:29 2000 UTC (9 years, 10 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9468 byte(s)
Diff to previous 84493 (colored)
Include ap_config.h before httpd.h, this ensures that AP_USE_HSREGEX is
defined correctly in all C files.

Revision 84493 - (view) (annotate) - [select for diffs]
Modified Wed Jan 19 01:16:31 2000 UTC (9 years, 10 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9445 byte(s)
Diff to previous 84072 (colored)
Finish the commits for the change in the header files.  Basically, this hides
all of the Apache macros that modules don't need access to.  This should
have been committed with the modules, but I wasn't paying attention to the
directory I was in when I ran the commit.
Submitted by:	Manoj Kasichainula and Ryan Bloom

Revision 84072 - (view) (annotate) - [select for diffs]
Modified Sat Oct 30 01:56:35 1999 UTC (10 years ago) by manoj
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9403 byte(s)
Diff to previous 84029 (colored)
Get rid of an implicit malloc, by making ap_create_tcp_socket use the
process context.

Revision 84029 - (view) (annotate) - [select for diffs]
Modified Sun Oct 24 05:59:22 1999 UTC (10 years, 1 month ago) by bjh
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9464 byte(s)
Diff to previous 84007 (colored)
Enhancements for APR network_io. Adds separate local/remote access methods for
a socket's port, IP address and sockaddr_in.

Updates for Apache code to use these, allowing the correct IP address of
clients to be logged.

Revision 84007 - (view) (annotate) - [select for diffs]
Modified Wed Oct 20 12:50:12 1999 UTC (10 years, 1 month ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9453 byte(s)
Diff to previous 83971 (colored)
Add a status value to ap_log_error and ap_log_rerror.  This allows us to use
apr_status codes in our error logs.  The main advantage of this, is portable
error codes.  Now, Windows will finally be able to use errno!

Revision 83971 - (view) (annotate) - [select for diffs]
Modified Mon Oct 11 22:54:29 1999 UTC (10 years, 1 month ago) by martin
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9380 byte(s)
Diff to previous 83956 (colored)
I cannot solve this right now. But this variable sure was uninitialized

Revision 83956 - (view) (annotate) - [select for diffs]
Modified Sun Oct 10 20:35:06 1999 UTC (10 years, 1 month ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9283 byte(s)
Diff to previous 83949 (colored)
Bring network code to the parameter order spec.  This means contexts go last,
and result parameters go first.  Also fixed a small bug in the Makefile.  We
should be removing the libs dir when we do a distclean, we are now.

Revision 83949 - (view) (annotate) - [select for diffs]
Modified Fri Oct 8 12:56:40 1999 UTC (10 years, 1 month ago) by dreid
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9283 byte(s)
Diff to previous 83943 (colored)
I think this was missed earlier, and as BeOS doesn't define SO_SNDBUF it was stopping the build.  APR_SO_SNDBUF is defined and so all is well again.

Revision 83943 - (view) (annotate) - [select for diffs]
Modified Thu Oct 7 20:48:26 1999 UTC (10 years, 1 month ago) by bhyde
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9279 byte(s)
Diff to previous 83927 (colored)
Well this was thought provoking.

Drive out the use of malloc in two places.

In listen.c, using the global process pool instead.  That changes the
API into listen so that a process is passed in rather than the config
pool.  That's all was easy.

The pain is propogating a change into all N of the mpm, they
are all similar but different in their use of listen.c  There
is a lot to dislike about similar but code scattered code.

I changed the N setup_listener routines, they now take only
the server since they can dig the config and global pool
out of there.

Free today: ap_setup_prelinked_modules now takes the process so it
can allocate it's table in the process's pool rathern than use
malloc.

Revision 83927 - (view) (annotate) - [select for diffs]
Modified Mon Oct 4 16:38:16 1999 UTC (10 years, 1 month ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9143 byte(s)
Diff to previous 83918 (colored)
First patch to re-order function parameters.  This one gets the low hanging
fruit, and moves most of the result parameters to the first argument.
Future patches in this series will move the rest of the result parameters
to the beginning of the list, and will move the context's to the end of the
list

Revision 83918 - (view) (annotate) - [select for diffs]
Modified Fri Sep 24 22:01:21 1999 UTC (10 years, 2 months ago) by manoj
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9143 byte(s)
Diff to previous 83906 (colored)
Restarts were hosed after the APR changes because we were opening
sockets even when we had them open already. So, for now, add an "active"
flag that indicates whether the socket stored in the listen_rec is an
actual open socket yet.

Revision 83906 - (view) (annotate) - [select for diffs]
Modified Sat Sep 18 11:48:17 1999 UTC (10 years, 2 months ago) by ben
Original Path: httpd/httpd/trunk/server/listen.c
File length: 8956 byte(s)
Diff to previous 83879 (colored)
Make ap_getipaddr threadsafe.

Revision 83879 - (view) (annotate) - [select for diffs]
Modified Wed Sep 8 14:15:55 1999 UTC (10 years, 2 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 8947 byte(s)
Diff to previous 83852 (colored)
Remove all of the calls to functions like "ap_popenf".  These functions were
moved down to APR, but they are being removed.  They are not portable, and
were only moved down for backwards compatability.  With this change, they can
be safely removed, which is the next commit on it's way.
Submitted by:  Ryan Bloom and Paul Reder

Revision 83852 - (view) (annotate) - [select for diffs]
Modified Tue Aug 31 05:35:52 1999 UTC (10 years, 2 months ago) by rbb
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9463 byte(s)
Diff to previous 83743 (colored)
Changed pools to contexts.  Tested with prefork and pthread mpm's.  I'll
check this out tomorrow and make sure everything was checked in correctly.

Revision 83743 - (view) (annotate) - [select for diffs]
Modified Sat Aug 21 04:43:15 1999 UTC (10 years, 3 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9424 byte(s)
Diff to previous 83505 (colored)
Forgot listen.c in the earlier AcceptEx patch to winnt.c.
Enable winnt mpm to detech OS at runtime.

Revision 83505 - (view) (annotate) - [select for diffs]
Modified Mon Jul 26 07:03:09 1999 UTC (10 years, 4 months ago) by dgaudet
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9149 byte(s)
Diff to previous 83394 (colored)
some bug fixes from David

Submitted by:	David Reid <beos@server1.jetnet.co.uk>

Revision 83394 - (view) (annotate) - [select for diffs]
Modified Tue Jun 29 02:49:29 1999 UTC (10 years, 5 months ago) by manoj
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9150 byte(s)
Diff to previous 83390 (colored)
Change method of checking for active FDs after poll() in the pthread
MPM. The new method doesn't require any changes to the listen
abstraction.

Revision 83390 - (view) (annotate) - [select for diffs]
Modified Sun Jun 27 03:45:15 1999 UTC (10 years, 5 months ago) by manoj
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9171 byte(s)
Diff to previous 83385 (colored)
Updated the pthread MPM to work with the rest of the code

Revision 83385 - (view) (annotate) - [select for diffs]
Added Fri Jun 25 01:25:11 1999 UTC (10 years, 5 months ago) by dgaudet
Original Path: httpd/httpd/trunk/server/listen.c
File length: 9150 byte(s)
- ap_listen.h: interface to Listen, ListenBackLog and SendBufferSize
  directives
- I didn't update mpmt_pthread with this change, it shouldn't be hard to fix.
- maybe this isn't the best way to abstract listen... but it gets a little
  bit of the job done

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

apache@apache.org
ViewVC Help
Powered by ViewVC 1.1.2