Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 4746 - Modems don't hang up to international destination
Summary: Modems don't hang up to international destination
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: getty_ps
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-08-27 14:00 UTC by eric.ayers
Modified: 2014-03-17 02:09 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-11-23 13:21:37 UTC


Attachments (Terms of Use)

Description eric.ayers 1999-08-27 14:00:11 UTC
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 16:50:59 UTC
Could you add this as an attachment in bugzilla?  Thanks.

Comment 2 eric.ayers 1999-11-23 13:21:59 UTC
===================================================================
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 17:36:26 UTC
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.