From d829e387d8fb29d020fea2c638f319aaee424837 Mon Sep 17 00:00:00 2001 From: "timm%netscape.com" Date: Fri, 7 Aug 1998 00:07:27 +0000 Subject: [PATCH] fix for long timeout on cancelled or dropped connections --- cmd/dialup/as_html/1step.js | 75 ++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/cmd/dialup/as_html/1step.js b/cmd/dialup/as_html/1step.js index 6aefd572aff1..798c583f40fd 100644 --- a/cmd/dialup/as_html/1step.js +++ b/cmd/dialup/as_html/1step.js @@ -120,21 +120,6 @@ function configureDialer( configFolder, acctSetupIni, regFile ) // * configure the dialer plugin.DialerConfig( dialerData, true ); - // * check if we need to reboot - if ( plugin.NeedReboot() == true ) - { - // XXX hardcode in name of next screen??? - globals.forceReboot( "1step.htm" ); - return; - } - - if ( plugin.DialerConnect() == false ) - { - plugin.DialerHangup(); - // XXX hardcode in name of next screen??? - window.location.replace( "error2.htm" ); - return; - } } function loadData() @@ -154,26 +139,9 @@ function loadData() var regSource = globals.GetNameValuePair( acctSetupIni, "Mode Selection", "RegSource" ); - var localFlag = globals.GetNameValuePair( regFile, "Dial-In Configuration", "LocalMode" ); - localFlag = localFlag.toLowerCase(); - globals.debug( "localFlag:" + localFlag ); - if ( localFlag != "yes" ) - { - globals.debug( "LocalMode==no" ); - var connectStatusFlag = plugin.IsDialerConnected(); - if ( connectStatusFlag == true ) - { - if ( confirm( "Account Setup can't connect until you close your current connection. Close the connection now?" ) == false ) - return; - plugin.DialerHangup(); - } - - configureDialer( configFolder, acctSetupIni, regFile ); - } - - regCGI = globals.GetNameValuePair( regFile, "IP", "RegCGI" ); - regRoot = globals.GetNameValuePair( regFile, "Configuration", "RegRoot" ); - metadataMode = globals.GetNameValuePair( regFile, "Configuration", "MetadataMode" ); + var regCGI = globals.GetNameValuePair( regFile, "IP", "RegCGI" ); + var regRoot = globals.GetNameValuePair( regFile, "Configuration", "RegRoot" ); + var metadataMode = globals.GetNameValuePair( regFile, "Configuration", "MetadataMode" ); if ( metadataMode == "no" ) globals.debug( "MetadataMode==no, you will not be downloading necessary metadata" ); @@ -217,6 +185,43 @@ function loadData() reggieData[ 6 ] = "CST_AREA_CODE_4=" + documentVars.altAreaCode3.value; reggieData[ 7 ] = "CST_COUNTRY_CODE=" + "1"; + + var localFlag = globals.GetNameValuePair( regFile, "Dial-In Configuration", "LocalMode" ); + localFlag = localFlag.toLowerCase(); + globals.debug( "localFlag:" + localFlag ); + if ( localFlag != "yes" ) + { + globals.debug( "LocalMode==no" ); + var connectStatusFlag = plugin.IsDialerConnected(); + if ( connectStatusFlag == true ) + { + if ( confirm( "Account Setup can't connect until you close your current connection. Close the connection now?" ) == false ) + return; + plugin.DialerHangup(); + } + + configureDialer( configFolder, acctSetupIni, regFile ); + + // * check if we need to reboot + if ( plugin.NeedReboot() == true ) + { + // XXX hardcode in name of next screen??? + globals.forceReboot( "1step.htm" ); + return; + } + + //globals.debug( "connecting..." ); + if ( plugin.DialerConnect() == false ) + { + //globals.debug( "dialer not connected" ); + plugin.DialerHangup(); + // XXX hardcode in name of next screen??? + window.location.replace( "error2.htm" ); + return; + } + //globals.debug( "done..." ); + } + /*documentVars.countryCode.value;*/ //if ( localFlag != "yes" )