X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=plink.c;h=7023f9d10c25739f0797882dd23576dc87bbdf9f;hb=382ffaf0262c8b552cf5bd32dbf922ceacbf921d;hp=8d4701a9217708b76f33588c1d305969d9a2bd9d;hpb=6608016fc28d97e9fd5f53cfc671f9e7ccafd8ce;p=PuTTY.git diff --git a/plink.c b/plink.c index 8d4701a9..7023f9d1 100644 --- a/plink.c +++ b/plink.c @@ -452,6 +452,9 @@ int main(int argc, char **argv) } else if (!strcmp(p, "-telnet")) { default_protocol = cfg.protocol = PROT_TELNET; default_port = cfg.port = 23; + } else if (!strcmp(p, "-rlogin")) { + default_protocol = cfg.protocol = PROT_RLOGIN; + default_port = cfg.port = 513; } else if (!strcmp(p, "-raw")) { default_protocol = cfg.protocol = PROT_RAW; } else if (!strcmp(p, "-v")) { @@ -735,8 +738,11 @@ int main(int argc, char **argv) { char *error; char *realhost; + /* nodelay is only useful if stdin is a character device (console) */ + int nodelay = cfg.tcp_nodelay && + (GetFileType(GetStdHandle(STD_INPUT_HANDLE)) == FILE_TYPE_CHAR); - error = back->init(cfg.host, cfg.port, &realhost); + error = back->init(cfg.host, cfg.port, &realhost, nodelay); if (error) { fprintf(stderr, "Unable to open connection:\n%s", error); return 1;