httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Susi <ps...@cfl.rr.com>
Subject Re: ap_process_connection
Date Fri, 26 Aug 2005 16:02:35 GMT
Except that it isn't REALLY defined there.  The use of all these macros
is giving me a headache.  There are a number of papers out there on why
this kind of macro (ab)use is bad, mainly because it makes it impossible
to understand the code.

server/connection.c has this:

AP_IMPLEMENT_HOOK_RUN_FIRST(int,process_connection,(conn_rec
*c),(c),DECLINED)

Well what the heck does that do?  There's no function body defined
there.  I'm guessing that macro does some tricks to achieve something
like polymorphism in C, binding an object to a set of functions that
should be called in a given event.  I can't see what function is being
bound to the process_connection event though.

When I looked up the definition of this macro, it is itself defined
using another macro.  My eyes have now gone crossed.  Maybe I'll try to
understand these evil macros later.

C.G. Lee wrote:
>  >Where is this function implemented? I can't seem to find it.
>  
> When I was exploring the Apache2 source code, I couldn't understand the 
> ap_process_connection(). Why is it there? What does it doing?? 
>  
> I don't know what you're doing, but the function ap_process_connection 
> is in the server/connection.c.
>  
> 

Mime
View raw message