Author: atsushi
Date: 2006-06-28 12:05:20 -0400 (Wed, 28 Jun 2006)
New Revision: 62117

Modified:
   trunk/mcs/class/System/System.Net.Sockets/ChangeLog
   trunk/mcs/class/System/System.Net.Sockets/Socket.cs
Log:
2006-06-28  Atsushi Enomoto  <[EMAIL PROTECTED]>

        * Socket.cs : use ConfigurationManager.GetSection() under NET_2_0.
          Also make sure to avoid NRE.



Modified: trunk/mcs/class/System/System.Net.Sockets/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Net.Sockets/ChangeLog 2006-06-28 15:45:08 UTC 
(rev 62116)
+++ trunk/mcs/class/System/System.Net.Sockets/ChangeLog 2006-06-28 16:05:20 UTC 
(rev 62117)
@@ -1,3 +1,8 @@
+2006-06-28  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
+       * Socket.cs : use ConfigurationManager.GetSection() under NET_2_0.
+         Also make sure to avoid NRE.
+
 2006-06-24  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * Socket.cs: Add stubs for net 2.0 SendTimeout and ReceiveTimeout 
properties.

Modified: trunk/mcs/class/System/System.Net.Sockets/Socket.cs
===================================================================
--- trunk/mcs/class/System/System.Net.Sockets/Socket.cs 2006-06-28 15:45:08 UTC 
(rev 62116)
+++ trunk/mcs/class/System/System.Net.Sockets/Socket.cs 2006-06-28 16:05:20 UTC 
(rev 62117)
@@ -740,8 +740,9 @@
                        if(ipv6Supported == -1) {
 #if NET_2_0 && CONFIGURATION_DEP
                                SettingsSection config;
-                               config = (SettingsSection) 
System.Configuration.ConfigurationSettings.GetConfig("system.net/settings");
-                               ipv6Supported = config.Ipv6.Enabled ? -1 : 0;
+                               config = (SettingsSection) 
System.Configuration.ConfigurationManager.GetSection ("system.net/settings");
+                               if (config != null)
+                                       ipv6Supported = config.Ipv6.Enabled ? 
-1 : 0;
 #else
                                NetConfig config = 
(NetConfig)System.Configuration.ConfigurationSettings.GetConfig("system.net/settings");
 

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

Reply via email to