[Mono-bugs] [Bug 47847][Nor] New - LogicalCallContext created at wrong time in MethodCallMessage
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sat, 23 Aug 2003 16:48:16 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by vladimir@pobox.com.
http://bugzilla.ximian.com/show_bug.cgi?id=47847
--- shadow/47847 2003-08-23 16:48:16.000000000 -0400
+++ shadow/47847.tmp.24768 2003-08-23 16:48:16.000000000 -0400
@@ -0,0 +1,64 @@
+Bug#: 47847
+Product: Mono/Runtime
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: vladimir@pobox.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: LogicalCallContext created at wrong time in MethodCallMessage
+
+The attached sample program prints "not null" under the MS CLR,
+but prints "null" under the mono runtime. The issue seems to be that
+the LogicalCallContext, in mono, is created in the standard
+RemotingProxy's Invoke method -- this method never gets called when
+there's a custom proxy involved. I'll attach a patch which moves
+the LogicalCallContext creation into RealProxy.PrivateInvoke, just before
+Invoke() is called; let me know if it's okay to commit.
+
+--- bug6.cs ---
+using System;
+using System.Collections;
+using System.Runtime.Remoting;
+using System.Runtime.Remoting.Messaging;
+using System.Runtime.Remoting.Proxies;
+using System.Runtime.Remoting.Channels;
+
+public abstract class TestClass : MarshalByRefObject {
+ public abstract void Foo ();
+}
+
+public class TestProxy : RealProxy {
+ public TestProxy (Type baseType) : base (baseType)
+ {
+ }
+
+ public override IMessage Invoke (IMessage msg) {
+ IMethodCallMessage mcall = msg as IMethodCallMessage;
+ if (mcall.LogicalCallContext == null)
+ Console.WriteLine ("null");
+ else
+ Console.WriteLine ("not null");
+
+ return new ReturnMessage (null, null, 0,
+ mcall.LogicalCallContext,
+ mcall);
+ }
+}
+
+public class Driver {
+ public static void Main () {
+ TestProxy tp = new TestProxy (typeof(TestClass));
+ TestClass tc = (TestClass) tp.GetTransparentProxy();
+ tc.Foo();
+ }
+}
+--- end ---