Author: zoltan
Date: 2008-01-25 14:38:31 -0500 (Fri, 25 Jan 2008)
New Revision: 93953

Modified:
   
trunk/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/ChangeLog
   
trunk/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpChannel.cs
   
trunk/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.cs
Log:
2008-01-25  Zoltan Varga  <[EMAIL PROTECTED]>

        * TcpChannel.cs (Init): Handle properties == null.

        * TcpClientChannel.cs (.ctor): Ditto. Fixes #355905.


Modified: 
trunk/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/ChangeLog
===================================================================
--- 
trunk/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/ChangeLog
      2008-01-25 19:24:40 UTC (rev 93952)
+++ 
trunk/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/ChangeLog
      2008-01-25 19:38:31 UTC (rev 93953)
@@ -1,3 +1,9 @@
+2008-01-25  Zoltan Varga  <[EMAIL PROTECTED]>
+
+       * TcpChannel.cs (Init): Handle properties == null.
+
+       * TcpClientChannel.cs (.ctor): Ditto. Fixes #355905.
+       
 2006-01-09  Robert Jordan  <[EMAIL PROTECTED]>
 
        * TcpServerChannel.cs (ProcessMessages): Flush the stream only when

Modified: 
trunk/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpChannel.cs
===================================================================
--- 
trunk/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpChannel.cs
  2008-01-25 19:24:40 UTC (rev 93952)
+++ 
trunk/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpChannel.cs
  2008-01-25 19:38:31 UTC (rev 93953)
@@ -57,14 +57,16 @@
                {
                        _clientChannel = new TcpClientChannel 
(properties,clientSink);
 
-                       if(properties["port"] != null)
-                               _serverChannel = new 
TcpServerChannel(properties, serverSink);
+                       if (properties != null) {
+                               if(properties["port"] != null)
+                                       _serverChannel = new 
TcpServerChannel(properties, serverSink);
 
-                       object val = properties ["name"];
-                       if (val != null) _name = val as string;
+                               object val = properties ["name"];
+                               if (val != null) _name = val as string;
                        
-                       val = properties ["priority"];
-                       if (val != null) _priority = Convert.ToInt32 (val);
+                               val = properties ["priority"];
+                               if (val != null) _priority = Convert.ToInt32 
(val);
+                       }
                }
 
 

Modified: 
trunk/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.cs
===================================================================
--- 
trunk/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.cs
    2008-01-25 19:24:40 UTC (rev 93952)
+++ 
trunk/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.cs
    2008-01-25 19:38:31 UTC (rev 93953)
@@ -51,11 +51,13 @@
 
                public TcpClientChannel (IDictionary properties, 
IClientChannelSinkProvider sinkProvider)
                {
-                       object val = properties ["name"];
-                       if (val != null) name = val as string;
+                       if (properties != null) {
+                               object val = properties ["name"];
+                               if (val != null) name = val as string;
                        
-                       val = properties ["priority"];
-                       if (val != null) priority = Convert.ToInt32 (val);
+                               val = properties ["priority"];
+                               if (val != null) priority = Convert.ToInt32 
(val);
+                       }
                        
                        if (sinkProvider != null)
                        {

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

Reply via email to