Bug 21726 - RETRYCONNECT=no broken
RETRYCONNECT=no broken
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: wvdial (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-12-04 21:05 EST by Jonathan Stanford
Modified: 2007-04-18 12:30 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-07-08 11:12:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
allows option for wvdial abort on NO DIALTONE or BUSY errors (3.08 KB, patch)
2000-12-05 13:31 EST, Jonathan Stanford
no flags Details | Diff

  None (edit)
Description Jonathan Stanford 2000-12-04 21:05:37 EST
Despite RETRYCONNECT=no being set in /etc/sysconfg/network-scripts/ifcfg-ppp0
pppd will still try to reconnect when the modem resonds with the "NO DIAL
TONE" error!

(yes... the modem i'm testing with puts out "NO DIAL TONE" instead of "NO
DIALTONE".... this might be part of the bug)

-Jonathan Stanford
<jomast@mindspring.com>
Comment 1 Jonathan Stanford 2000-12-05 13:28:41 EST
A modified wvdial is required.  I've attached the patch so that you can include
it with the bug report.(courtesy of Ken Humborg)

diff -urN wvdial-1.41/wvdial/wvdial.cc wvdial-1.41.1/wvdial/wvdial.cc
--- wvdial-1.41/wvdial/wvdial.cc	Sun May  7 19:56:18 2000
+++ wvdial-1.41.1/wvdial/wvdial.cc	Sun May  7 18:00:49 2000
@@ -157,10 +157,18 @@
 	}
     }

+    int retval;
+
+    if ((dialer.status() != WvDialer::Idle) || !dialer.isok()) {
+
retval = 1;
+    } else {
+
retval = 0;
+    }
+
     dialer.hangup();

     if( syslog )
 	delete syslog;

-    return( 0 );
+    return( retval );
 }
diff -urN wvdial-1.41/wvdial/wvdialer.cc wvdial-1.41.1/wvdial/wvdialer.cc
--- wvdial-1.41/wvdial/wvdialer.cc	Sun May  7 19:56:18 2000
+++ wvdial-1.41.1/wvdial/wvdialer.cc	Sun May  7 19:48:29 2000
@@ -391,6 +391,8 @@
     	{ "Stupid Mode",     NULL, &options.stupid_mode,   "", false        },
     	{ "New PPPD",	     NULL, &options.new_pppd, 	   "", true         },
     	{ "Auto Reconnect",  NULL, &options.auto_reconnect,"", true	    },
+    	{ "Abort On Busy",   NULL, &options.abort_on_busy, "", false	    },
+    	{ "Abort On No Dialtone",   NULL, &options.abort_on_no_dialtone, "", false	    },
     	{ NULL,		     NULL, NULL,                   "", 0            }
     };

@@ -556,17 +558,27 @@
 	return;
     case 2:	// NO DIALTONE
     case 3:	// NO DIAL TONE
-
err( "No dial tone.  Trying again in 5 seconds.\n" );
-
stat = PreDial2;
-
connect_attempts++;
-
dial_stat = 3;
+
if( options.abort_on_no_dialtone == true ) {
+
    err( "No dial tone.\n" );
+
    stat = ModemError;
+
} else {
+
    err( "No dial tone.  Trying again in 5 seconds.\n" );
+
    stat = PreDial2;
+
    connect_attempts++;
+
    dial_stat = 3;
+
}
 	return;
     case 4:	// BUSY
-
log( WvLog::Warning, "The line is busy.  Trying again.\n" );
-
stat = PreDial1;
-
connect_attempts++;
-
dial_stat = 4;
-
sleep( 2 );
+
if( options.abort_on_busy == true ) {
+
    log( WvLog::Warning, "The line is busy.\n" );
+
    stat = ModemError;
+
} else {
+
    log( WvLog::Warning, "The line is busy.  Trying again.\n" );
+
    stat = PreDial1;
+
    connect_attempts++;
+
    dial_stat = 4;
+
    sleep( 2 );
+
}
 	return;
     case 5:	// ERROR
 	err( "Invalid dial command.\n" );
diff -urN wvdial-1.41/wvdial/wvdialer.h wvdial-1.41.1/wvdial/wvdialer.h
--- wvdial-1.41/wvdial/wvdialer.h	Sun May  7 19:56:18 2000
+++ wvdial-1.41.1/wvdial/wvdialer.h	Sun May  7 19:48:49 2000
@@ -107,6 +107,8 @@
     	int		stupid_mode;
     	int		new_pppd;
     	int		auto_reconnect;
+    	int		abort_on_busy;
+    	int		abort_on_no_dialtone;
     } options;

 private:
diff -urN wvdial-1.41/wvdial.1 wvdial-1.41.1/wvdial.1
--- wvdial-1.41/wvdial.1	Sun Nov 28 21:16:21 1999
+++ wvdial-1.41.1/wvdial.1	Sun May  7 19:52:50 2000
@@ -314,6 +314,18 @@
 will attempt to automatically reestablish a connection if you are
 randomly disconnected by the other side.
 This option is "on" by default.
+.TP
+.I Abort On Busy
+If enabled,
+.B wvdial
+will not retry the connection if the modem says that the line is busy.
+This option is "off" by default.
+.TP
+.I Abort On No Dialtone
+If enabled,
+.B wvdial
+will not retry the connection if the modem says that there is no dialtone.
+This option is "off" by default.
 .PP
 The
 .BR wvdialconf (1)

Comment 2 Jonathan Stanford 2000-12-05 13:31:32 EST
Created attachment 6070 [details]
allows option for wvdial abort on NO DIALTONE or BUSY errors
Comment 3 Bill Nottingham 2000-12-05 14:22:06 EST
Assigning to the wvdial package.
Comment 4 Jonathan Stanford 2000-12-11 08:27:41 EST
after appling this patch, it still apears to not work for me.... BUT, just
yesterday it started working like it should (aborting on NO DIAL TONE).  The
only thing that i see that has happened is that i have rebooted.  Not sure why
this would have a berring on the matter, but i cant argue with the results....
Comment 5 Harald Hoyer 2005-07-08 11:12:50 EDT
should work in current versions

Note You need to log in before you can comment on or make changes to this bug.