* CrossAppDomainChannel.cs: Before the domain switch, save and reset
authorLluis Sanchez <lluis@novell.com>
Thu, 23 Oct 2003 11:34:21 +0000 (11:34 -0000)
committerLluis Sanchez <lluis@novell.com>
Thu, 23 Oct 2003 11:34:21 +0000 (11:34 -0000)
  thread's datastore. Restore it on return. This fixes bug #49774.

svn path=/trunk/mcs/; revision=19338

mcs/class/corlib/System.Runtime.Remoting.Channels/ChangeLog
mcs/class/corlib/System.Runtime.Remoting.Channels/CrossAppDomainChannel.cs

index aa94cc22431f20fae4f21c401d03241adfdb493c..586e5bdd75cfadcd5dbd9154ee463e4cbdfe7103 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-23  Lluis Sanchez Gual <lluis@ximian.com>
+
+       * CrossAppDomainChannel.cs: Before the domain switch, save and reset
+         thread's datastore. Restore it on return. This fixes bug #49774.
+
 2003-09-11  Lluis Sanchez Gual <lluis@ximian.com>
 
        * ChannelServices.cs: Call context management moved to RemotingServices.
index b6544ae829f2220ace7c715f3a9242912d8db3a4..4cbd740788fe4d0dadd261d58b2fccd61f3fc176 100755 (executable)
@@ -1,7 +1,8 @@
 //
-// System.Runtime.Remoting.Channels.CrossDomainChannel.cs
+// System.Runtime.Remoting.Channels.CrossAppDomainChannel.cs
 //
-// Author: Patrik Torstensson (totte_mono@yahoo.com)
+// Author: Patrik Torstensson (totte_mono@yahoo.com)\r
+//         Lluis Sanchez Gual (lluis@ximian.com)
 //
 // 2003 (C) Copyright, Ximian, Inc.
 //
@@ -176,8 +177,9 @@ namespace System.Runtime.Remoting.Channels
                                        arrRequest = reqMsgStream.GetBuffer();\r
                                }\r
 \r
+                               object threadStatus = Thread.ResetDataStoreStatus ();\r
                                Context currentContext = Thread.CurrentContext;
-                               AppDomain currentDomain = AppDomain.InternalSetDomainByID ( _domainID );
+                               AppDomain currentDomain = AppDomain.InternalSetDomainByID ( _domainID );\r
 
                                try 
                                {
@@ -192,6 +194,7 @@ namespace System.Runtime.Remoting.Channels
                                {
                                        AppDomain.InternalSetDomain (currentDomain);
                                        AppDomain.InternalSetContext (currentContext);
+                                       Thread.RestoreDataStoreStatus (threadStatus);\r
                                }\r
                                \r
                                if (null != arrResponse) {\r