Hi,

Guys, I really need your opinion on this thing, so please read this letter.
BTW: if you think that these questions should go to another list (I believe
this is not the case), please let me know as well.

Two things, both concerning server/mpm/prefork/prefork.c in httpd-2.0.32
(beta), both tightly connected to manipulating 'ap_listeners' list.

First, 'num_listensocks' variable. It is initialized in open_logs
hook (why there?). If I add any ap_listen_rec structures to 'ap_listeners'
in my post_config hook, this value is not updated. The result is that
not all of the listeners are copied to 'listensocks' array (see
'child_init' function). Shouldn't 'num_listensocks' be recalculated after
post_config hook? Or its initialization moved to an additional, post_config
hook of prefork MPM (with APR_HOOK_LAST)?

Another thing is accept_func from ap_listen_rec structure. If my socket
is an UDP socket, my accept function is called on arriving data. I can
process it there (not elegant, accept_mutex is locked then) or simply
return the socket unchanged. The problem is that there are only two
results of accept_func foreseen (see 'got_fd' label in prefork.c).
1 - APR_SUCCESS, leading to create_connection, which has trouble when
dealing with non-TCP sockets (tries TCP_NODELAY).
2 - APR_EGENERAL, leading to child_exit, which also is not what we want.
Why only two of them? Why cannot be there a third one, on which mpm
returns to polling? Or additional, process_conn_func in the ap_listen_rec,
called for socket instead of create_connection/process_connection?

Both these things would make it easy to support UDP sockets inside apache
- I think the aim is worth the effort.

Regards,
M.
--
+------------------------ ---- -- -- -  -     -   
: Michal Szymaniak | mailto:[EMAIL PROTECTED]
.

Reply via email to