[System] Suppress a few instances of CS0618 obsolete warnings
[mono.git] / mcs / class / System / System.Net / EndPointManager.cs
index a4ee4a24ad13def9f5c74834acce2ded6f06ff6c..9a103f45cd72898eaec07552c2b693cde4f9816f 100644 (file)
@@ -26,8 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if SECURITY_DEP
-
 using System.Collections;
 using System.Collections.Generic;
 namespace System.Net {
@@ -86,7 +84,9 @@ namespace System.Net {
                                addr = IPAddress.Any;
                        else if (IPAddress.TryParse(host, out addr) == false){
                                try {
+#pragma warning disable 618
                                        IPHostEntry iphost = Dns.GetHostByName(host);
+#pragma warning restore 618
                                        if (iphost != null)
                                                addr = iphost.AddressList[0];
                                        else
@@ -107,7 +107,7 @@ namespace System.Net {
                        if (p.ContainsKey (port)) {
                                epl = (EndPointListener) p [port];
                        } else {
-                               epl = new EndPointListener (addr, port, secure);
+                               epl = new EndPointListener (listener, addr, port, secure);
                                p [port] = epl;
                        }
 
@@ -158,5 +158,4 @@ namespace System.Net {
                }
        }
 }
-#endif