exsltRegisterAll in proper place
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 27 Feb 2014 09:01:12 +0000 (10:01 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 27 Feb 2014 09:01:12 +0000 (10:01 +0100)
src/init_globals.c

index 0800a4b..81cb966 100644 (file)
@@ -55,11 +55,11 @@ void yaz_init_globals(void)
             gcry_control(GCRYCTL_INITIALIZATION_FINISHED, NULL, 0);
         }
 #endif
-        yaz_init_flag = 1;
-    }
 #if YAZ_HAVE_EXSLT
-    exsltRegisterAll();
+        exsltRegisterAll();
 #endif
+        yaz_init_flag = 1; /* must be last, before unlocking */
+    }
 #if YAZ_POSIX_THREADS
     pthread_mutex_unlock(&yaz_init_mutex);
 #endif