httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: svn commit: r1692486 [2/2] - in /httpd/httpd/trunk: docs/log-message-tags/ include/ modules/http2/ modules/ssl/ server/
Date Fri, 24 Jul 2015 13:51:43 GMT


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

Mime
View raw message