Author: mhabersack
Date: 2007-07-20 18:17:18 -0400 (Fri, 20 Jul 2007)
New Revision: 82390

Modified:
   trunk/mono/mono/metadata/ChangeLog
   trunk/mono/mono/metadata/appdomain.c
Log:
2007-07-21  Marek Habersack  <[EMAIL PROTECTED]>

        * appdomain.c (get_shadow_assembly_location): append the current
        ticks value to the path. Avoids overwriting the same assemblies by
        several threads at the same time.


Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog  2007-07-20 22:10:23 UTC (rev 82389)
+++ trunk/mono/mono/metadata/ChangeLog  2007-07-20 22:17:18 UTC (rev 82390)
@@ -1,3 +1,9 @@
+2007-07-21  Marek Habersack  <[EMAIL PROTECTED]>
+
+       * appdomain.c (get_shadow_assembly_location): append the current
+       ticks value to the path. Avoids overwriting the same assemblies by
+       several threads at the same time.
+
 2007-07-20  Atsushi Enomoto  <[EMAIL PROTECTED]>
        and Raja R Harinath  <[EMAIL PROTECTED]>
 

Modified: trunk/mono/mono/metadata/appdomain.c
===================================================================
--- trunk/mono/mono/metadata/appdomain.c        2007-07-20 22:10:23 UTC (rev 
82389)
+++ trunk/mono/mono/metadata/appdomain.c        2007-07-20 22:17:18 UTC (rev 
82390)
@@ -850,15 +850,16 @@
 get_shadow_assembly_location (const char *filename)
 {
        gint32 hash = 0, hash2 = 0;
+       guint32 ticks = GetTickCount ();
        char name_hash [9];
-       char path_hash [19];
+       char path_hash [30];
        char *bname = g_path_get_basename (filename);
        MonoDomain *domain = mono_domain_get ();
        
        hash = get_cstring_hash (bname);
        hash2 = get_cstring_hash (g_path_get_dirname (filename));
        g_snprintf (name_hash, sizeof (name_hash), "%08x", hash);
-       g_snprintf (path_hash, sizeof (path_hash), "%08x_%08x", hash ^ hash2, 
hash2);
+       g_snprintf (path_hash, sizeof (path_hash), "%08x_%08x_%08x", hash ^ 
hash2, hash2, ticks);
        return g_build_filename (mono_string_to_utf8 
(domain->setup->dynamic_base), 
                                 "assembly", 
                                 "shadow", 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to