[Ttssh2-commit] [5620] チケット #33822 notify_nonfatal_errorの一部停止

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2014年 6月 26日 (木) 21:48:22 JST


Revision: 5620
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5620
Author:   yutakapon
Date:     2014-06-26 21:48:19 +0900 (Thu, 26 Jun 2014)
Log Message:
-----------
チケット #33822 notify_nonfatal_errorの一部停止

ポート転送でローカルアプリケーションにデータ送信する処理で、送信失敗した場合の
エラーポップアップメッセージ(&ログ採取)を抑止することができる設定を追加した。
デフォルトは無効。

[TTSSH] @ TERATERM.INI
DisablePopupMessage=0

Ticket Links:
------------
    http://sourceforge.jp/projects/ttssh2/tracker/detail/33822

Modified Paths:
--------------
    trunk/installer/release/TERATERM.INI
    trunk/ttssh2/ttxssh/fwd.c
    trunk/ttssh2/ttxssh/ttxssh.c
    trunk/ttssh2/ttxssh/ttxssh.h

-------------- next part --------------
Modified: trunk/installer/release/TERATERM.INI
===================================================================
--- trunk/installer/release/TERATERM.INI	2014-06-24 14:11:16 UTC (rev 5619)
+++ trunk/installer/release/TERATERM.INI	2014-06-26 12:48:19 UTC (rev 5620)
@@ -816,6 +816,12 @@
 ; SSH Icon
 SSHIcon=Default
 
+; Disable error popup-message box
+;  0 ... Default(not disabling)
+;  1 ... Sending forwarded data to a local port
+DisablePopupMessage=0
+
+
 [TTProxy]
 ConnectionTimeout="10"
 SocksResolve="auto"

Modified: trunk/ttssh2/ttxssh/fwd.c
===================================================================
--- trunk/ttssh2/ttxssh/fwd.c	2014-06-24 14:11:16 UTC (rev 5619)
+++ trunk/ttssh2/ttxssh/fwd.c	2014-06-26 12:48:19 UTC (rev 5620)
@@ -1839,10 +1839,15 @@
 		if (!UTIL_sock_buffered_write
 			(pvar, &channel->writebuf, blocking_write, s, data, length)) {
 			closed_local_connection(pvar, local_channel_num);
-			UTIL_get_lang_msg("MSG_FWD_COMM_ERROR", pvar,
-			                  "A communications error occurred while sending forwarded data to a local port.\n"
-			                  "The forwarded connection will be closed.");
-			notify_nonfatal_error(pvar, pvar->ts->UIMsg);
+
+			// \x83|\x83b\x83v\x83A\x83b\x83v\x97}\x8E~\x8Ew\x92肠\x82\xEA\x82΁A\x8A֐\x94\x82\xF0\x8CĂяo\x82\xB3\x82Ȃ\xA2\x81B
+			// (2014.6.26 yutaka)
+			if ((pvar->settings.DisablePopupMessage & POPUP_MSG_FWD_received_data) == 0) {
+				UTIL_get_lang_msg("MSG_FWD_COMM_ERROR", pvar,
+								  "A communications error occurred while sending forwarded data to a local port.\n"
+								  "The forwarded connection will be closed.");
+				notify_nonfatal_error(pvar, pvar->ts->UIMsg);
+			}
 		}
 	}
 

Modified: trunk/ttssh2/ttxssh/ttxssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.c	2014-06-24 14:11:16 UTC (rev 5619)
+++ trunk/ttssh2/ttxssh/ttxssh.c	2014-06-26 12:48:19 UTC (rev 5620)
@@ -470,6 +470,9 @@
 		settings->IconID = IDI_SECURETT;
 	}
 
+	// \x83G\x83\x89\x81[\x82\xA8\x82\xE6\x82ьx\x8D\x90\x8E\x9E\x82̃|\x83b\x83v\x83A\x83b\x83v\x83\x81\x83b\x83Z\x81[\x83W\x82\xF0\x97}\x8E~\x82\xB7\x82\xE9 (2014.6.26 yutaka)
+	settings->DisablePopupMessage = GetPrivateProfileInt("TTSSH", "DisablePopupMessage", 0, fileName);
+
 	clear_local_settings(pvar);
 }
 
@@ -570,6 +573,9 @@
 	// SSH \x83A\x83C\x83R\x83\x93
 	WritePrivateProfileString("TTSSH", "SSHIcon",
 	                          (settings->IconID==IDI_SECURETT_YELLOW) ? "yellow" : "Default", fileName);
+
+	_itoa(settings->DisablePopupMessage, buf, 10);
+	WritePrivateProfileString("TTSSH", "DisablePopupMessage", buf, fileName);
 }
 
 

Modified: trunk/ttssh2/ttxssh/ttxssh.h
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.h	2014-06-24 14:11:16 UTC (rev 5619)
+++ trunk/ttssh2/ttxssh/ttxssh.h	2014-06-26 12:48:19 UTC (rev 5620)
@@ -97,6 +97,12 @@
 #define OPTION_REPLACE  2
 
 /*
+ * DisablePopupMessage \x97p\x82̃r\x83b\x83g\x92\xE8\x8B`
+ */
+#define POPUP_MSG_default			0
+#define POPUP_MSG_FWD_received_data	(1 << 0)
+
+/*
 These are the fields that WOULD go in Tera Term's 'ts' structure, if
 we could put them there.
 */
@@ -149,6 +155,8 @@
 	BOOL VerifyHostKeyDNS;
 
 	int IconID;
+
+	int DisablePopupMessage;
 } TS_SSH;
 
 typedef struct _TInstVar {



Ttssh2-commit メーリングリストの案内
Back to archive index