If --enable-dav-fs is not specified, we never created the
dav_repos_providers hash, so we segfault in apr_hash_get() when we try
to look up "filesystem" in the dav_repos_providers hash.

One silly fix is shown below.  

Another possibility : create the hash in dav's register_hooks
function.  We wouldn't need to check for hash == NULL in
dav_register_provider() and dav_lookup_provider().

Index: modules/dav/main/providers.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/dav/main/providers.c,v
retrieving revision 1.7
diff -u -r1.7 providers.c
--- modules/dav/main/providers.c        2001/02/16 04:26:35     1.7
+++ modules/dav/main/providers.c        2001/03/06 21:33:55
@@ -80,5 +80,8 @@
 
 const dav_provider * dav_lookup_provider(const char *name)
 {
-    return apr_hash_get(dav_repos_providers, name, APR_HASH_KEY_STRING);
+    if (dav_repos_providers) {
+        return apr_hash_get(dav_repos_providers, name, APR_HASH_KEY_STRING);
+    }
+    return NULL;
 }

-- 
Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Reply via email to