disable autodialer in windows mobile. r=bsmedberg, a=beltzner
authordougt@meer.net
Wed, 20 Feb 2008 14:41:27 -0800
changeset 11969 ab8525079cfc083ca3f571611d45cc95ca4c94eb
parent 11968 20503a4c409eea3f22733db3189c2ba59fb39869
child 11970 463822bab8aa4c777c1e489c9d6c01516db36c14
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg, beltzner
milestone1.9b4pre
disable autodialer in windows mobile. r=bsmedberg, a=beltzner
netwerk/base/src/Makefile.in
netwerk/base/src/nsIOService.cpp
netwerk/base/src/nsSocketTransport2.cpp
--- a/netwerk/base/src/Makefile.in
+++ b/netwerk/base/src/Makefile.in
@@ -98,19 +98,20 @@ CPPSRCS		= \
 GQI_SRCS = neckobase.gqi
 LOCAL_INCLUDES = -I$(topsrcdir)/xpcom/ds
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
 	CPPSRCS += nsURLHelperOS2.cpp
 else
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 	CPPSRCS += nsURLHelperWin.cpp
+ifneq ($(OS_ARCH), WINCE)
 	CPPSRCS += nsNativeConnectionHelper.cpp
 	CPPSRCS += nsAutodialWin.cpp
-
+endif
 else
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 	CPPSRCS += nsURLHelperOSX.cpp
 else
 	CPPSRCS += nsURLHelperUnix.cpp
 endif
 endif
 endif
--- a/netwerk/base/src/nsIOService.cpp
+++ b/netwerk/base/src/nsIOService.cpp
@@ -898,17 +898,17 @@ nsIOService::TrackNetworkLinkStatusForOf
     // check to make sure this won't collide with Autodial
     if (mSocketTransportService) {
         PRBool autodialEnabled = PR_FALSE;
         mSocketTransportService->GetAutodialEnabled(&autodialEnabled);
         // If autodialing-on-link-down is enabled, check if the OS auto dial 
         // option is set to always autodial. If so, then we are 
         // always up for the purposes of offline management.
         if (autodialEnabled) {
-#if defined(XP_WIN)
+#if defined(XP_WIN) && !defined(WINCE)
             // On Windows, need to do some registry checking to see if
             // autodial is enabled at the OS level. Only if that is
             // enabled are we always up for the purposes of offline
             // management.
             if(nsNativeConnectionHelper::IsAutodialEnabled()) 
                 return SetOffline(PR_FALSE);
 #else
             return SetOffline(PR_FALSE);
--- a/netwerk/base/src/nsSocketTransport2.cpp
+++ b/netwerk/base/src/nsSocketTransport2.cpp
@@ -1241,17 +1241,17 @@ nsSocketTransport::RecoverFromError()
     if (mState == STATE_CONNECTING && mDNSRecord) {
         nsresult rv = mDNSRecord->GetNextAddr(SocketPort(), &mNetAddr);
         if (NS_SUCCEEDED(rv)) {
             LOG(("  trying again with next ip address\n"));
             tryAgain = PR_TRUE;
         }
     }
 
-#if defined(XP_WIN)
+#if defined(XP_WIN) && !defined(WINCE)
     // If not trying next address, try to make a connection using dialup. 
     // Retry if that connection is made.
     if (!tryAgain) {
         PRBool autodialEnabled;
         gSocketTransportService->GetAutodialEnabled(&autodialEnabled);
         if (autodialEnabled)
             tryAgain = nsNativeConnectionHelper::OnConnectionFailed(SocketHost().get());
     }