aboutsummaryrefslogtreecommitdiff
path: root/rtty.c
diff options
context:
space:
mode:
Diffstat (limited to 'rtty.c')
-rw-r--r--rtty.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/rtty.c b/rtty.c
index 18eeae6..aa62f45 100644
--- a/rtty.c
+++ b/rtty.c
@@ -22,7 +22,7 @@ main(int argc, char *argv[])
char bufin[MAXBUF], bufout[MAXBUF], *bi, *bo, in[30], **nargv,
out[30], pw[255];
fd_set rfds0, rfds1;
- int detect, fdin, fdout, i, n, offset, sshpass;
+ int dumb, fdin, fdout, i, n, offset, sshpass;
struct timeval tv;
signal(SIGCHLD, sigchld);
@@ -35,9 +35,9 @@ main(int argc, char *argv[])
err(1, "mkfifo");
/* Process rtty-specific flags. */
- detect = sshpass = 0;
+ dumb = sshpass = 0;
for(;argv[1][0] == '+';){
- if(strchr(argv[1], 'd')) detect = 1;
+ if(strchr(argv[1], 'd')) dumb = 1;
if(strchr(argv[1], 'p')) sshpass = 1;
/* Remove flag argument from argv. */
@@ -153,13 +153,12 @@ main(int argc, char *argv[])
fflush(stdout);
bufin[0] = 0;
- if(!detect)
- continue;
-
/*
- * As the +d flag is given, rtty tries to detect
+ * Unless the +d flag is given, rtty tries to detect
* password prompts and hide the user's input.
*/
+ if(dumb)
+ continue;
if(bo[strlen(bo)-1] == ':'
|| strcmp(bo+strlen(bo)-2, ": ") == 0){
if(!(bo = strrchr(bufout, '\n')))