Author: philip
Date: Mon Jun  9 15:38:47 2014
New Revision: 1601411

URL: http://svn.apache.org/r1601411
Log:
Followup to r1505066, fix 3rd-party FS module loading.

* subversion/libsvn_fs/fs-loader.c
  (get_or_allocate_third): Initialize new struct element.
  (get_library_vtable): Fix loop for 3rd-party modules.

Modified:
    subversion/trunk/subversion/libsvn_fs/fs-loader.c

Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.c?rev=1601411&r1=1601410&r2=1601411&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/trunk/subversion/libsvn_fs/fs-loader.c Mon Jun  9 15:38:47 2014
@@ -240,6 +240,7 @@ get_or_allocate_third(struct fs_type_def
   (*fst)->fs_type = apr_pstrdup(common_pool, fs_type);
   (*fst)->fsap_name = (*fst)->fs_type;
   (*fst)->initfunc = NULL;
+  (*fst)->vtable = NULL;
   (*fst)->next = NULL;
 
   return SVN_NO_ERROR;
@@ -255,16 +256,22 @@ get_library_vtable(fs_library_vtable_t *
   struct fs_type_defn **fst;
   svn_boolean_t known = FALSE;
 
-  /* There are two FS module definitions known at compile time.  We
+  /* There are three FS module definitions known at compile time.  We
      want to check these without any locking overhead even when
      dynamic third party modules are enabled.  The third party modules
      cannot be checked until the lock is held.  */
   for (fst = &fs_modules; *fst; fst = &(*fst)->next)
-    if (strcmp(fs_type, (*fst)->fs_type) == 0)
-      {
-        known = TRUE;
-        break;
-      }
+    {
+      if (strcmp(fs_type, (*fst)->fs_type) == 0)
+        {
+          known = TRUE;
+          break;
+        }
+      else if (!(*fst)->next)
+        {
+          break;
+        }
+    }
 
 #if defined(SVN_USE_DSO) && APR_HAS_DSO
   /* Third party FS modules that are unknown at compile time.


Reply via email to