
brian at brianfrance
Oct 27, 2009, 9:29 AM
Post #18 of 19
(1220 views)
Permalink
|
|
Re: svn commit: r823703 - in /httpd/httpd/trunk: CHANGES modules/dav/fs/repos.c modules/dav/main/mod_dav.h
[In reply to]
|
|
Ya, I have been trying to get somebody to commit this fixup patch: http://www.brianfrance.com/software/apache/dav/fixup.diff It fixes comments of the new function pointers (so they match others), moves the function to static to remove compile time warnings and fixes the order in the structure definition. Can anybody with commit access please review and commit? Brian On Oct 27, 2009, at 11:58 AM, Guenter Knauf wrote: > Hi, > minfrin [at] apache schrieb: >> 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 >> @@ -46,6 +46,7 @@ >> apr_pool_t *pool; /* memory storage pool associated with >> request */ >> const char *pathname; /* full pathname to resource */ >> apr_finfo_t finfo; /* filesystem info */ >> + request_rec *r; >> }; >> /* private context for doing a filesystem walk */ >> @@ -210,6 +211,11 @@ >> ** >> ** PRIVATE REPOSITORY FUNCTIONS >> */ >> +request_rec *dav_fs_get_request_rec(const dav_resource *resource) >> +{ >> + return resource->info->r; >> +} >> + >> apr_pool_t *dav_fs_pool(const dav_resource *resource) >> { >> return resource->info->pool; >> @@ -648,6 +654,7 @@ >> /* Create private resource context descriptor */ >> ctx = apr_pcalloc(r->pool, sizeof(*ctx)); >> ctx->finfo = r->finfo; >> + ctx->r = r; >> /* ### this should go away */ >> ctx->pool = r->pool; >> @@ -1816,6 +1823,9 @@ >> dav_fs_remove_resource, >> dav_fs_walk, >> dav_fs_getetag, >> + dav_fs_get_request_rec, >> + dav_fs_pathname, >> + NULL >> }; >> static dav_prop_insert dav_fs_insert_prop(const dav_resource >> *resource, > here seems to be a problem with the order: > Compiling repos.c > ### mwccnlm Compiler: > # File: repos.c > # ---------------- > # 1827: dav_fs_pathname, > # Error: ^ > # illegal implicit conversion from 'char * (const struct > dav_resource *)' to > # 'struct request_rec * (*)(const struct dav_resource *)' > > Errors caused tool to abort. > > From what we have in mod_dav.h > /* Get the entity tag for a resource */ > const char * (*getetag)(const dav_resource *resource); > > /* > ** If a provider needs a context to associate with this hooks > structure, > ** 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); > > > it seems to me that it should be: > Index: repos.c > =================================================================== > --- repos.c (revision 830029) > +++ 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 > }; > > > Gün. > >
|