Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@novell.com>2004-07-02 19:37:50 +0400
committerLluis Sanchez <lluis@novell.com>2004-07-02 19:37:50 +0400
commita551eeb2fd791436ecd486b4d1390307234e1117 (patch)
treebcbf397b68186debdb3bac7627bc684e21391ce6
parentd9482df336496e1b6f578ab83245522971e11a83 (diff)
* RemotingConfiguration.cs: Avoid adding "id" and "type" as custom
properties of providers. This fixes bug #60934. * ServerIdentity.cs, RemotingServices.cs: When disposing an identity, detach the identity from the object, so it can be safely marshalled again. svn path=/branches/mono-1-0/mcs/; revision=30685
-rwxr-xr-xmcs/class/corlib/System.Runtime.Remoting/ChangeLog7
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs4
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs4
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting/ServerIdentity.cs8
4 files changed, 19 insertions, 4 deletions
diff --git a/mcs/class/corlib/System.Runtime.Remoting/ChangeLog b/mcs/class/corlib/System.Runtime.Remoting/ChangeLog
index 1fc62be042d..de3e2e619b5 100755
--- a/mcs/class/corlib/System.Runtime.Remoting/ChangeLog
+++ b/mcs/class/corlib/System.Runtime.Remoting/ChangeLog
@@ -1,3 +1,10 @@
+2004-07-02 Lluis Sanchez Gual <lluis@ximian.com>
+
+ * RemotingConfiguration.cs: Avoid adding "id" and "type" as custom
+ properties of providers. This fixes bug #60934.
+ * ServerIdentity.cs, RemotingServices.cs: When disposing an identity, detach
+ the identity from the object, so it can be safely marshalled again.
+
2004-06-15 Gert Driesen <drieseng@users.sourceforge.net>
* RemotingTimeoutException.cs: added missing serialization ctor
diff --git a/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs b/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs
index 204bc6b4368..2cbe62dff51 100644
--- a/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs
@@ -721,9 +721,9 @@ namespace System.Runtime.Remoting
if (at == "id" && isTemplate)
prov.Id = val;
- if (at == "type")
+ else if (at == "type")
prov.Type = val;
- if (at == "ref" && !isTemplate)
+ else if (at == "ref" && !isTemplate)
prov.Ref = val;
else
prov.CustomProperties.Add (at, val);
diff --git a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs
index aa694cbb3b6..475164d981a 100644
--- a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs
@@ -159,8 +159,10 @@ namespace System.Runtime.Remoting
else
throw new ArgumentException ("The obj parameter is a proxy.");
}
- else
+ else {
identity = obj.ObjectIdentity;
+ obj.ObjectIdentity = null;
+ }
if (identity == null || !identity.IsConnected)
return false;
diff --git a/mcs/class/corlib/System.Runtime.Remoting/ServerIdentity.cs b/mcs/class/corlib/System.Runtime.Remoting/ServerIdentity.cs
index f5ed96a066b..72c025121d0 100644
--- a/mcs/class/corlib/System.Runtime.Remoting/ServerIdentity.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting/ServerIdentity.cs
@@ -136,7 +136,13 @@ namespace System.Runtime.Remoting
protected void DisposeServerObject()
{
- _serverObject = null;
+ // Detach identity from server object to avoid problems if the
+ // object is marshalled again.
+
+ if (_serverObject != null) {
+ _serverObject.ObjectIdentity = null;
+ _serverObject = null;
+ }
}
}