From e7334ba3403198025c2242e5c455e924c045a324 Mon Sep 17 00:00:00 2001
From: David N Bertoni <dbertoni@apache.org>
Date: Fri, 17 Jun 2005 20:49:10 +0000
Subject: [PATCH] Fix for concurrency issue with deserialized schema grammars.

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@191195 13f79535-47bb-0310-9956-ffa450edef68
---
 src/xercesc/validators/schema/ComplexTypeInfo.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/xercesc/validators/schema/ComplexTypeInfo.cpp b/src/xercesc/validators/schema/ComplexTypeInfo.cpp
index 8865574c3..a83a362dc 100644
--- a/src/xercesc/validators/schema/ComplexTypeInfo.cpp
+++ b/src/xercesc/validators/schema/ComplexTypeInfo.cpp
@@ -926,6 +926,14 @@ void ComplexTypeInfo::serialize(XSerializeEngine& serEng)
          fContentSpecOrgURI = 0;
          fContentSpecOrgURISize = 0;
          fUniqueURI = 0;
+
+         // Create the content model by calling getContentModel().  This
+         // will ensure the grammar can be used concurrently by multiple
+         // parsers.
+         // Don't bother to do check unique particle attribution, since
+         // this will already have been done when the grammar was first
+         // created (if full schema checking was enabled).
+         getContentModel(false);
     }
 }
 
-- 
GitLab