tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1158991 - in /tomcat/jk/trunk: native/iis/jk_isapi_plugin.c xdocs/miscellaneous/changelog.xml
Date Thu, 18 Aug 2011 01:54:31 GMT
Author: timw
Date: Thu Aug 18 01:54:31 2011
New Revision: 1158991

URL: http://svn.apache.org/viewvc?rev=1158991&view=rev
Log:
Use the DLL handle to make the shared memory file name used by the ISAPI Redirector unique
for each DLL - the redirector supports multiple instances per website, and without this multiple
redirectors could access the same shared memory file, corrupting the contents (evident when
LB workers are used on IIS 7).

Modified:
    tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
    tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1158991&r1=1158990&r2=1158991&view=diff
==============================================================================
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Thu Aug 18 01:54:31 2011
@@ -108,6 +108,9 @@ static char HTTP_QUERY_HEADER_NAME[MAX_P
 static char HTTP_WORKER_HEADER_NAME[MAX_PATH];
 static char HTTP_WORKER_HEADER_INDEX[MAX_PATH];
 
+/* DLL Handle - used to unique shared memory file */
+static char DLL_INSTANCE_ID[MAX_PATH];
+
 #define REGISTRY_LOCATION       ("Software\\Apache Software Foundation\\Jakarta Isapi Redirector\\1.0")
 #define W3SVC_REGISTRY_KEY      ("SYSTEM\\CurrentControlSet\\Services\\W3SVC\\Parameters")
 #define EXTENSION_URI_TAG       ("extension_uri")
@@ -2402,6 +2405,8 @@ BOOL WINAPI DllMain(HINSTANCE hInst,    
         StringCbPrintf(HTTP_WORKER_HEADER_NAME, MAX_PATH, HTTP_HEADER_TEMPLATE, WORKER_HEADER_NAME_BASE,
hInst);
         StringCbPrintf(HTTP_WORKER_HEADER_INDEX, MAX_PATH, HTTP_HEADER_TEMPLATE, WORKER_HEADER_INDEX_BASE,
hInst);
 
+        StringCbPrintf(DLL_INSTANCE_ID, MAX_PATH, "%p", hInst);
+
         JK_INIT_CS(&init_cs, rc);
         JK_INIT_CS(&log_cs, rc);
 
@@ -2601,6 +2606,9 @@ static int init_jk(char *serverName)
 
     jk_log(logger, JK_LOG_INFO, "Starting %s", (FULL_VERSION_STRING));
 
+    StringCbCat(shm_name, MAX_PATH, "_");
+    StringCbCat(shm_name, MAX_PATH, DLL_INSTANCE_ID);
+
     if (*serverName) {
         size_t i;
         StringCbCat(shm_name, MAX_PATH, "_");

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1158991&r1=1158990&r2=1158991&view=diff
==============================================================================
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Thu Aug 18 01:54:31 2011
@@ -40,6 +40,19 @@
   new documentation project for JK was started.
   </p>
 </section>
+<section name="Changes between 1.2.32 and 1.2.33">
+  <br />
+  <subsection name="Native">
+    <changelog>
+      <fix>
+        IIS: Made the shared memory file name used by the ISAPI Redirector
+        unique for each redirector DLL instance. Avoids issues caused by
+        shared memory being corrupted by other redirectors on the same site.
+        (timw)
+      </fix>
+    </changelog>
+  </subsection>
+</section>
 <section name="Changes between 1.2.31 and 1.2.32">
   <br />
   <subsection name="Native">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message