[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-dev
Subject:    Re: svn commit: r1692486 [2/2] - in /httpd/httpd/trunk: docs/log-message-tags/ include/ modules/http
From:       Ruediger Pluem <rpluem () apache ! org>
Date:       2015-07-24 13:51:43
Message-ID: 55B242EF.7020801 () apache ! org
[Download RAW message or body]



On 07/24/2015 02:09 PM, icing@apache.org wrote:
> Modified: httpd/httpd/trunk/server/protocol.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/protocol.c?rev=1692486&r1=1692485&r2=1692486&view=diff
>  ==============================================================================
> --- httpd/httpd/trunk/server/protocol.c (original)
> +++ httpd/httpd/trunk/server/protocol.c Fri Jul 24 12:09:44 2015
> @@ -67,6 +67,9 @@ APR_HOOK_STRUCT(
> APR_HOOK_LINK(http_scheme)
> APR_HOOK_LINK(default_port)
> APR_HOOK_LINK(note_auth_failure)
> +    APR_HOOK_LINK(protocol_propose)
> +    APR_HOOK_LINK(protocol_switch)
> +    APR_HOOK_LINK(protocol_get)
> )
> 
> AP_DECLARE_DATA ap_filter_rec_t *ap_old_write_func = NULL;
> @@ -1944,6 +1947,125 @@ AP_DECLARE(void) ap_send_interim_respons
> apr_brigade_destroy(x.bb);
> }
> 
> +/* Something like this must be in APR, only I do not find it... */
> +static int array_index(apr_array_header_t *array, const char *s)
> +{
> +    int i;
> +    for (i = 0; i < array->nelts; i++) {
> +        const char *p = APR_ARRAY_IDX(array, i, const char *);
> +        if (!strcmp(p, s)) {
> +            return i;
> +        }
> +    }
> +    return -1;
> +}

If not in APR it should probably be put into util.c and made ap_array_index.
Once in APR it could be converted into a wrapper macro around the APR function.

Regards

RĂ¼diger


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic