2007-05-19 Robert Jordan <robertj@gmx.net>
authorRobert Jordan <robertj@gmx.net>
Sat, 19 May 2007 17:57:16 +0000 (17:57 -0000)
committerRobert Jordan <robertj@gmx.net>
Sat, 19 May 2007 17:57:16 +0000 (17:57 -0000)
* IpcClientChannel.cs (CreateMessageSink, IpcToUnix):
don't try to parse null URLs because non wellknown remote objects
don't have one. Fixes bug #81653.

* IpcClientChannel.cs (ChangeUri): make static, reuse IpcToUnix ().

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

mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc.Unix/ChangeLog
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc.Unix/IpcClientChannel.cs

index 1c74c611571393df323cc340315c6e5509b27369..be4753102e649499e70e55ac5e01a4f561b8768e 100644 (file)
@@ -1,3 +1,11 @@
+2007-05-19  Robert Jordan  <robertj@gmx.net>
+
+       * IpcClientChannel.cs (CreateMessageSink, IpcToUnix):
+       don't try to parse null URLs because non wellknown remote objects
+       don't have one. Fixes bug #81653.
+
+       * IpcClientChannel.cs (ChangeUri): make static, reuse IpcToUnix ().
+
 2005-10-16  Robert Jordan  <robertj@gmx.net>
 
        * Imported
index 4b6a1a9d8f93bc48f1d9d66aeaf8cec26728e9c5..b207217f452d1fc110b41f0f95c7a77efa3bd48a 100644 (file)
@@ -80,6 +80,9 @@ namespace System.Runtime.Remoting.Channels.Ipc.Unix
                 //
                 internal static string IpcToUnix (string url)
                 {
+                       if (url == null)
+                               return null;
+
                         string portName;
                         string objectUri;
                         Win32.IpcChannelHelper.Parse (url, out portName, out objectUri);
@@ -106,7 +109,7 @@ namespace System.Runtime.Remoting.Channels.Ipc.Unix
         //
         // Simple message sink that changes ipc URLs to unix URLs.
         //
-        class UrlMapperSink : IMessageSink
+        sealed class UrlMapperSink : IMessageSink
         {
                 readonly IMessageSink _sink;
 
@@ -120,14 +123,11 @@ namespace System.Runtime.Remoting.Channels.Ipc.Unix
                         get { return _sink.NextSink; }
                 }
 
-                void ChangeUri (IMessage msg)
+                static void ChangeUri (IMessage msg)
                 {
                         string uri = msg.Properties ["__Uri"] as string;
                         if (uri != null) {
-                                string objectUri;
-                                Win32.IpcChannelHelper.Parse (uri, out objectUri);
-                                if (objectUri != null)
-                                        msg.Properties ["__Uri"] = objectUri;
+                                msg.Properties ["__Uri"] = IpcClientChannel.IpcToUnix (uri);
                         }
                 }