Bug 4746 - Modems don't hang up to international destination
Modems don't hang up to international destination
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: getty_ps (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-08-27 10:00 EDT by eric.ayers
Modified: 2014-03-16 22:09 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-11-23 08:21:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description eric.ayers 1999-08-27 10:00:11 EDT
It looks like the hard coded value of 2 seconds
isn't always long enough to make sure that the phone
is hung up when we call some foreign countries.

I have a patch for this (I also mailed this to
bugs@redhat.com, sorry for the redundancy)


 We had a very expensive phone bill to Panama this week,
because the remote
modem did not hang up the line if we just left it down for 2
seconds.
have patched uugetty to have the capability to leave the
line hung up
for longer than 2 seconds by specifying HANGUPSECS in the
config file,
or the -H command line parameter.

from /etc/default/uugetty.ttyC6:

CLEAR = NO
HANGUP=YES
# I hacked the UUgetty code to support a longer hangup time.
# the default is 2 seconds and that isn't always enough
HANGUPSECS=6


I downloaded the package /tmp/getty_ps-2.0.7j-7.src.rpm
from the RedHat rawhide distribution and added my changes to
that
set of source code.

Thanks!
-Eric.
Eric.Ayers@compgen.com


uxdial:/usr/src/redhat/BUILD/getty_ps-2.0.7j# rcsdiff main.c
extern.h man/getty.1
===================================================================
RCS file: RCS/main.c,v
retrieving revision 1.1
diff -r1.1 main.c
176a177
>       HangUpSecs =    2;                      /* # of
seconds to hangup the line */
316c317
<       while((c = getopt(count, args, "RC:D:ac:d:hr:t:w:"))
!= EOF) {
---
>       while((c = getopt(count, args,
"RC:D:ac:d:hr:t:w:H:")) != EOF) {
346a348,350
>                       case 'H':
>                               HangUpSecs = atoi(optarg);
>                               break;
432a437,447
>       if((p = defvalue(def, "HANGUPSECS"))) {
>               HangUpSecs = atoi(p);
>               debug (D_RUN, "got HANGUPSECS value of %d
secs", HangUpSecs);
>       }
>       if (HangUpSecs < 2 || HangUpSecs >600) {
>                 /* sleep is not reliable < 2 seconds and >
600 sounds like */
>               /* a typo */
>               logerr("Value for HANGUPSECS on %s should be
between 2 and 600 secs", Device);
>               HangUpSecs = 2;
>       }
>
669c684
<       if(! NoHangUp) sleep(2);
---
>       if(! NoHangUp) sleep(HangUpSecs);
===================================================================
RCS file: RCS/extern.h,v
retrieving revision 1.1
diff -r1.1 extern.h
52a53
> EXTERN  int     HangUpSecs;     /* Number of seconds to
hang up the line */
===================================================================
RCS file: man/RCS/getty.1,v
retrieving revision 1.1
diff -r1.1 man/getty.1
2c2
< .\" | $Id: getty.1,v 1.1 1999/08/27 13:48:42 eric Exp $
---
> .\" | $Id: getty.m4,v 2.0 90/09/19 20:11:33 paul Rel $
27c27,29
< [\-a] [\-h] [\-r
---
> [\-a] [\-h] [-H
> .I hangupsecs]
> [\-r
69c71
< .BR /etc/conf.getty,
---
> .BR /etc/default/getty,
121c123,129
< by setting the speed to zero.  Giving
---
> by setting the speed to zero.  You can specify the amount
of time
> to leave the line on-hook during a hangup by specifying
the
> .B \-H
> flag followed by anumber of seconds (or using
> .BI HANGUPSECS= hangupsecs
> in the defaults file).
> Giving
Comment 1 Bill Nottingham 1999-11-22 11:50:59 EST
Could you add this as an attachment in bugzilla?  Thanks.
Comment 2 eric.ayers 1999-11-23 08:21:59 EST
===================================================================
RCS file: RCS/main.c,v
retrieving revision 1.1
diff -r1.1 main.c
176a177
> 	HangUpSecs =	2;			/* # of seconds to hangup the line */
316c317
< 	while((c = getopt(count, args, "RC:D:ac:d:hr:t:w:")) != EOF) {
---
> 	while((c = getopt(count, args, "RC:D:ac:d:hr:t:w:H:")) != EOF) {
346a348,350
> 			case 'H':
> 				HangUpSecs = atoi(optarg);
> 				break;
432a437,447
> 	if((p = defvalue(def, "HANGUPSECS"))) {
> 		HangUpSecs = atoi(p);
> 		debug (D_RUN, "got HANGUPSECS value of %d secs", HangUpSecs);
> 	}
> 	if (HangUpSecs < 2 || HangUpSecs >600) {
>                 /* sleep is not reliable < 2 seconds and > 600 sounds like */
> 		/* a typo */
> 		logerr("Value for HANGUPSECS on %s should be between 2 and 600 secs",
Device);
> 		HangUpSecs = 2;
> 	}
>
669c684
< 	if(! NoHangUp) sleep(2);
---
> 	if(! NoHangUp) sleep(HangUpSecs);
===================================================================
RCS file: RCS/extern.h,v
retrieving revision 1.1
diff -r1.1 extern.h
52a53
> EXTERN  int     HangUpSecs;     /* Number of seconds to hang up the line */
===================================================================
RCS file: man/RCS/getty.1,v
retrieving revision 1.1
diff -r1.1 man/getty.1
2c2
< .\" |	$Id: getty.1,v 1.1 1999/08/27 13:48:42 eric Exp $
---
> .\" |	$Id: getty.m4,v 2.0 90/09/19 20:11:33 paul Rel $
27c27,29
< [\-a] [\-h] [\-r
---
> [\-a] [\-h] [-H
> .I hangupsecs]
> [\-r
69c71
< .BR /etc/conf.getty,
---
> .BR /etc/default/getty,
121c123,129
< by setting the speed to zero.  Giving
---
> by setting the speed to zero.  You can specify the amount of time
> to leave the line on-hook during a hangup by specifying the
> .B \-H
> flag followed by a number of seconds (or using
> .BI HANGUPSECS= hangupsecs
> in the defaults file).
> Giving
233c241
< .BI /etc/conf.getty .line,
---
> .BI /etc/default/getty .line,
235c243
< .BR /etc/conf.getty ),
---
> .BR /etc/default/getty ),
510c518
< .BI /etc/conf.defaults_file.
---
> .BI /etc/default/defaults_file.
786c794
< /etc/conf.getty[\fI.line\fR]
---
> /etc/default/getty[\fI.line\fR]
789c797
< uses /etc/conf.uugetty[\fI.line\fR].
---
> uses /etc/default/uugetty[\fI.line\fR].
Comment 3 Bill Nottingham 2000-06-10 13:36:26 EDT
fixed in getty_ps-2.0.7j-11.
Apologies for the extremely long delay.

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