• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision6958 (tree)
Time2017-10-24 21:05:11
Authordoda

Log Message

SSH 接続で通知する端末速度の値を設定可能にした。 #37598

TELNET TERMINAL SPEED OPTION と共通の設定にする為、設定は [Tera Term]
セクションに置く。

設定例:

[Tera Term]
TerminalSpeed=38400 ; In/Out 共に 38400bps
; TerminalSped=38400,9600 ; In が38400bps, Out が 9600bps

注:
In/Out はサーバ側の TTY から見た物。
なので Tera Term からの送信が Input Speed、受信が Output Speed の
影響を受ける。(通常は気にする必要は無いはず)

Change Summary

Incremental Difference

--- trunk/teraterm/common/tttypes.h (revision 6957)
+++ trunk/teraterm/common/tttypes.h (revision 6958)
@@ -678,6 +678,8 @@
678678 WORD WaitCom;
679679 WORD ListHiddenFonts;
680680 char LogTimestampFormat[48];
681+ int TerminalInputSpeed;
682+ int TerminalOutputSpeed;
681683 };
682684
683685 typedef struct tttset TTTSet, *PTTSet;
--- trunk/teraterm/ttpset/ttset.c (revision 6957)
+++ trunk/teraterm/ttpset/ttset.c (revision 6958)
@@ -2045,6 +2045,19 @@
20452045 }
20462046 }
20472047
2048+ // Terminal Speed (Used by telnet and ssh)
2049+ GetPrivateProfileString(Section, "TerminalSpeed", "38400", Temp, sizeof(Temp), FName);
2050+ GetNthNum(Temp, 1, &i);
2051+ if (i > 0)
2052+ ts->TerminalInputSpeed = i;
2053+ else
2054+ ts->TerminalInputSpeed = 38400;
2055+ GetNthNum(Temp, 2, &i);
2056+ if (i > 0)
2057+ ts->TerminalOutputSpeed = i;
2058+ else
2059+ ts->TerminalOutputSpeed = ts->TerminalInputSpeed;
2060+
20482061 // Fallback to CP932 (Experimental)
20492062 ts->FallbackToCP932 = GetOnOff(Section, "FallbackToCP932", FName, FALSE);
20502063
@@ -3380,6 +3393,15 @@
33803393 }
33813394 WritePrivateProfileString(Section, "ISO2022ShiftFunction", Temp, FName);
33823395
3396+ // Terminal Speed
3397+ if (ts->TerminalInputSpeed == ts->TerminalOutputSpeed) {
3398+ WriteInt(Section, "TerminalSpeed", FName, ts->TerminalInputSpeed);
3399+ }
3400+ else {
3401+ WriteInt2(Section, "TerminalSpeed", FName,
3402+ ts->TerminalInputSpeed, ts->TerminalOutputSpeed);
3403+ }
3404+
33833405 // CygTerm Configuration File
33843406 WriteCygtermConfFile(ts);
33853407 }
--- trunk/ttssh2/ttxssh/ssh.c (revision 6957)
+++ trunk/ttssh2/ttxssh/ssh.c (revision 6958)
@@ -7462,9 +7462,9 @@
74627462
74637463 // TTY modeはここで渡す (2005.7.17 yutaka)
74647464 buffer_put_char(ttymsg, SSH2_TTY_OP_OSPEED);
7465- buffer_put_int(ttymsg, 9600); // baud rate
7465+ buffer_put_int(ttymsg, pvar->ts->TerminalOutputSpeed); // baud rate
74667466 buffer_put_char(ttymsg, SSH2_TTY_OP_ISPEED);
7467- buffer_put_int(ttymsg, 9600); // baud rate
7467+ buffer_put_int(ttymsg, pvar->ts->TerminalInputSpeed); // baud rate
74687468
74697469 // VERASE
74707470 buffer_put_char(ttymsg, SSH2_TTY_KEY_VERASE);
@@ -7505,7 +7505,8 @@
75057505 "out-speed: %d, in-speed: %d, verase: %s, onlcr: %s",
75067506 c->self_id, c->remote_id, req_type, pvar->ts->TermType,
75077507 pvar->ssh_state.win_cols, pvar->ssh_state.win_rows, x, y,
7508- 9600, 9600, (pvar->ts->BSKey==IdBS)?"^h":"^?", (pvar->ts->CRReceive==IdBS)?"on":"off");
7508+ pvar->ts->TerminalOutputSpeed, pvar->ts->TerminalInputSpeed,
7509+ (pvar->ts->BSKey==IdBS)?"^h":"^?", (pvar->ts->CRReceive==IdBS)?"on":"off");
75097510
75107511 pvar->session_nego_status = 2;
75117512
Show on old repository browser