On 10/09/2009 11:41 PM, minf...@apache.org wrote:
> Author: minfrin
> Date: Fri Oct  9 21:41:31 2009
> New Revision: 823703
> 
> URL: http://svn.apache.org/viewvc?rev=823703&view=rev
> Log:
> mod_dav: Provide a mechanism to obtain the request_rec and pathname
> from the dav_resource.
> Submitted by: Jari Urpalainen <jari.urpalainen nokia.com>,
>               Brian France <brian brianfrance.com>
> 
> Modified:
>     httpd/httpd/trunk/CHANGES
>     httpd/httpd/trunk/modules/dav/fs/repos.c
>     httpd/httpd/trunk/modules/dav/main/mod_dav.h
> 

> Modified: httpd/httpd/trunk/modules/dav/fs/repos.c
> URL: 
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/dav/fs/repos.c?rev=823703&r1=823702&r2=823703&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/dav/fs/repos.c (original)
> +++ httpd/httpd/trunk/modules/dav/fs/repos.c Fri Oct  9 21:41:31 2009

> @@ -1816,6 +1823,9 @@
>      dav_fs_remove_resource,
>      dav_fs_walk,
>      dav_fs_getetag,
> +    dav_fs_get_request_rec,
> +    dav_fs_pathname,
> +    NULL

This creates the following warning:

repos.c:1827: warning: initialization from incompatible pointer type

I assume the order of the arguments is wrong and needs to be

NULL,
dav_fs_get_request_rec,
dav_fs_pathname

instead. See below in the snipped from mod_dav.h:


> Modified: httpd/httpd/trunk/modules/dav/main/mod_dav.h
> URL: 
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/dav/main/mod_dav.h?rev=823703&r1=823702&r2=823703&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/dav/main/mod_dav.h (original)
> +++ httpd/httpd/trunk/modules/dav/main/mod_dav.h Fri Oct  9 21:41:31 2009
> @@ -1940,6 +1940,12 @@
>      ** then this field may be used. In most cases, it will just be NULL.
>      */
>      void *ctx;
> +
> +    /* return request record */
> +    request_rec * (*get_request_rec)(const dav_resource *resource);
> +
> +    /* return path */
> +    const char * (*get_pathname)(const dav_resource *resource);
>  };
>  

Regards

RĂ¼diger

Reply via email to