At 03:32 AM 2/26/2003, Greg Stein wrote:
>On Tue, Feb 25, 2003 at 11:25:21PM -0000, [EMAIL PROTECTED] wrote:
>>...
>>   +++ connection.c    25 Feb 2003 23:25:19 -0000      1.108
>>   @@ -199,10 +199,14 @@
>>    
>>    AP_CORE_DECLARE(void) ap_process_connection(conn_rec *c, void *csd)
>>    {
>>   +    apr_status_t rc;
>>        ap_update_vhost_given_ip(c);
>>    
>>   -    ap_run_pre_connection(c, csd);
>>   -
>>   +    rc = ap_run_pre_connection(c, csd);
>>   +    if (rc != OK && rc != DONE) {
>>   +        c->aborted = 1;
>>   +    }
>
>OK and DONE are not apr_status_t values. If you're truly returning a status,
>then you simply check for non-zero (or != APR_SUCCESS). If you truly want to
>return OK/DONE types of values, then the type of rc should be "int".
>
>IMO, since you aren't even at HTTP processing at this point, it *should* be
>an apr_status_t, and the OK/DONE types of values don't enter the picture.

They should, ap_run_pre_connection is an Apache hook.  Yes, it returns
an int, so the only change here should be

>>   -    apr_status_t rc;
>>   +    int rc;

We aren't calling apr_ function here, and hooks always allow OK, DONE,
or (result).

Bill 

Reply via email to