On Oct 10, 2009, at 4:04 AM, Ruediger Pluem wrote:
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);
};
Below is a patch to fix the bad struct declaration, sorry about that.
I missed it on the binary compatibility conversion.
Brian
Index: modules/dav/fs/repos.c
===================================================================
--- modules/dav/fs/repos.c (revision 824480)
+++ modules/dav/fs/repos.c (working copy)
@@ -1823,9 +1823,9 @@
dav_fs_remove_resource,
dav_fs_walk,
dav_fs_getetag,
+ NULL,
dav_fs_get_request_rec,
- dav_fs_pathname,
- NULL
+ dav_fs_pathname
};
static dav_prop_insert dav_fs_insert_prop(const dav_resource
*resource,