summaryrefslogtreecommitdiffstats
path: root/c/src/libnetworking/pppd/chat.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2005-01-20 17:00:38 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2005-01-20 17:00:38 +0000
commit4ca43d72e1e6af22688f868463e4ccf429e3f5c9 (patch)
treef7e2b7d3c7d0a61729e6952b907273df9897f630 /c/src/libnetworking/pppd/chat.c
parentCosmetics. (diff)
downloadrtems-4ca43d72e1e6af22688f868463e4ccf429e3f5c9.tar.bz2
2005-01-20 Joel Sherrill <joel@OARcorp.com>
PR 736/pppd * libnetworking/pppd/chat.c, libnetworking/pppd/demand.c, libnetworking/pppd/pppd.h, libnetworking/pppd/rtemsmain.c, libnetworking/pppd/sys-rtems.c, libnetworking/pppd/utils.c: ttyfd should not be static and should have a name more specific to pppd.
Diffstat (limited to '')
-rw-r--r--c/src/libnetworking/pppd/chat.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/c/src/libnetworking/pppd/chat.c b/c/src/libnetworking/pppd/chat.c
index 6623004d35..7697d09a86 100644
--- a/c/src/libnetworking/pppd/chat.c
+++ b/c/src/libnetworking/pppd/chat.c
@@ -163,7 +163,7 @@ static int use_env = 0;
static int exit_code = 0;
static char *phone_num = (char *) 0;
static char *phone_num2 = (char *) 0;
-static int ttyfd;
+/* static */ int pppd_ttyfd;
static int timeout = DEFAULT_CHAT_TIMEOUT;
#ifdef TERMIOS
@@ -246,7 +246,7 @@ int chatmain(int fd, int mode, char *pScript)
/* initialize exit code */
exit_code = 0;
- ttyfd = fd;
+ pppd_ttyfd = fd;
script=pScript;
@@ -271,14 +271,14 @@ int chatmain(int fd, int mode, char *pScript)
}
}
}
- ttyfd = (int)-1;
+ pppd_ttyfd = (int)-1;
return ( exit_code );
}
void break_sequence()
{
- tcsendbreak(ttyfd, 0);
+ tcsendbreak(pppd_ttyfd, 0);
}
/*
@@ -699,7 +699,7 @@ static int get_char()
while(tries)
{
- status = read(ttyfd, &c, 1);
+ status = read(pppd_ttyfd, &c, 1);
switch (status) {
case 1:
return ((int)c & 0x7F);
@@ -715,7 +715,7 @@ int c;
{
char ch = c;
- return(write(ttyfd, &ch, 1));
+ return(write(pppd_ttyfd, &ch, 1));
}
static int write_char (c)
@@ -791,10 +791,10 @@ register char *in_string;
memset(temp2, 0, sizeof(temp2));
- tcgetattr(ttyfd, &tios);
+ tcgetattr(pppd_ttyfd, &tios);
tios.c_cc[VMIN] = 0;
tios.c_cc[VTIME] = timeout*10/MAX_TIMEOUTS;
- tcsetattr(ttyfd, TCSANOW, &tios);
+ tcsetattr(pppd_ttyfd, TCSANOW, &tios);
string = clean(in_string, 0);
len = strlen(string);