ap_listen.h

Checkout Tools
  • last updated 7 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 98573 is being indexed.

finished that boring job:

update license to 2003.

Happy New Year! ;-))

  1. … 271 more files in changeset.
Update our copyright for this year.

  1. … 260 more files in changeset.
Fixed ap_listeners so that it will be included in the AWK generated export lists

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.

  1. … 7 more files in changeset.
Remove commas from the end of the macros that define

directives that are used by MPMs. Previous to this patch,

you would use these macros without commans, which was unlike

any other directives. Now, after the macro, you must have

a comma. This makes the macros look more like the rest of the

directives.

I know this is cosmetic, and I was going to leave it alone, but when

I found out that it bothered Cliff too, I decided to fix it after all.

Submitted by: Ryan Bloom and Cliff Woolley

  1. … 13 more files in changeset.
*) 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]

  1. … 4 more files in changeset.
Update copyright to 2001

  1. … 205 more files in changeset.
Include mpm.h so the tests for SPMT_OS2_MPM actually work.

Force all Apache functions to be linked into the executable, whether they

are used or not. This uses the same mechanism that is used for APR

and APR-util. This may not be the correct solution, but it works, and that

is what I really care about. This also renames CHARSET_EBCDIC to

AP_CHARSET_EBCDIC. This is for namespace correctness, but it also makes

the exports script a bit easier.

  1. … 24 more files in changeset.
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

  1. … 1 more file in changeset.
Remove an unnecessary header file.

PR:

Obtained from:

Submitted by:

Reviewed by:

Missed these first time round... More apr_port_t changes.

  1. … 2 more files in changeset.
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.

  1. … 2 more files in changeset.
prefix libapr functions and types with apr_

  1. … 143 more files in changeset.
Document ap_listen.h using ScanDoc.

OS/2: Put back creation of listeners in main thread in spmt_os2 MPM.

  1. … 2 more files in changeset.
Fix the prefork MPM to make it compile and work again out-of-the-box.

  1. … 1 more file in changeset.
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.

  1. … 7 more files in changeset.
More consification, correct command initialisation.

  1. … 16 more files in changeset.

Fixes to allow Apache to run as a Win95 service... highlights

main_win32.h : Moved delarations to a header, by request

ap_listen.h : References types declared in http_config.h

http_main.h : Add the Win32 flavor entry point declaration

apr.hw : Cleanup the redundancy department of redundancy

win32/proc.c : Double null termination was required here

Everything else should be obvious and isolated to Win32.

Build files will be committed seperately.

  1. … 6 more files in changeset.
Update to Apache Software License version 1.1

  1. … 19 more files in changeset.
Fix all the License issues. Including:

s/Apache Group/Apache Software Foundation/

s/1999/2000/

s/Sascha's license/ASF license

  1. … 146 more files in changeset.
Use AcceptEx with an async completion port. What we are gaining here is

LIFO dispatching out of the worker thread pool.

  1. … 2 more files in changeset.
ap_listeners must be extern, otherwise you get multiple definitions

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.

  1. … 9 more files in changeset.
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.

  1. … 1 more file in changeset.
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

  1. … 20 more files in changeset.
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.

  1. … 100 more files in changeset.
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.

  1. … 1 more file in changeset.
Updated the pthread MPM to work with the rest of the code

  1. … 3 more files in changeset.