[System] xamarin_start_wwan is not available for tvOS and watchOS.
[mono.git] / mcs / class / System / System.Net / WebConnection.cs
index 5e760e05d2087bd44a3549a00a0b233bf1b11183..8c1523ad82484bb59a94c69298e2e3337a0b2c98 100644 (file)
@@ -82,12 +82,11 @@ namespace System.Net
                NtlmAuthState connect_ntlm_auth_state;
                HttpWebRequest connect_request;
 
-               bool ssl;
                Exception connect_exception;
                static object classLock = new object ();
                MonoTlsStream tlsStream;
 
-#if MONOTOUCH
+#if MONOTOUCH && !MONOTOUCH_TV && !MONOTOUCH_WATCH
                [System.Runtime.InteropServices.DllImport ("__Internal")]
                static extern void xamarin_start_wwan (string uri);
 #endif
@@ -153,7 +152,7 @@ namespace System.Net
                                IPHostEntry hostEntry = sPoint.HostEntry;
 
                                if (hostEntry == null) {
-#if MONOTOUCH
+#if MONOTOUCH && !MONOTOUCH_TV && !MONOTOUCH_WATCH
                                        xamarin_start_wwan (sPoint.Address.ToString ());
                                        hostEntry = sPoint.HostEntry;
                                        if (hostEntry == null) {
@@ -161,7 +160,7 @@ namespace System.Net
                                                status = sPoint.UsesProxy ? WebExceptionStatus.ProxyNameResolutionFailure :
                                                                            WebExceptionStatus.NameResolutionFailure;
                                                return;
-#if MONOTOUCH
+#if MONOTOUCH && !MONOTOUCH_TV && !MONOTOUCH_WATCH
                                        }
 #endif
                                }
@@ -395,7 +394,6 @@ namespace System.Net
 
                                if (request.Address.Scheme == Uri.UriSchemeHttps) {
 #if SECURITY_DEP
-                                       ssl = true;
                                        if (!reused || nstream == null || tlsStream == null) {
                                                byte [] buffer = null;
                                                if (sPoint.UseConnect) {
@@ -414,7 +412,6 @@ namespace System.Net
                                        throw new NotSupportedException ();
 #endif
                                } else {
-                                       ssl = false;
                                        nstream = serverStream;
                                }
                        } catch (Exception ex) {