[Ttssh2-commit] [8530] SSH Authentication Banner の MessageBox通知を Unicode 対応

scmno****@osdn***** scmno****@osdn*****
2020年 2月 7日 (金) 01:08:00 JST


Revision: 8530
          https://osdn.net/projects/ttssh2/scm/svn/commits/8530
Author:   zmatsuo
Date:     2020-02-07 01:08:00 +0900 (Fri, 07 Feb 2020)
Log Message:
-----------
SSH Authentication Banner の MessageBox通知を Unicode 対応

- teraterm.ini の TTSSH セクション AuthBanner=2 の時
- AuthBanner=3 (バルーンチップ/トースト通知)は未対応

Modified Paths:
--------------
    trunk/ttssh2/ttxssh/ssh.c

-------------- next part --------------
Modified: trunk/ttssh2/ttxssh/ssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ssh.c	2020-02-06 16:07:50 UTC (rev 8529)
+++ trunk/ttssh2/ttxssh/ssh.c	2020-02-06 16:08:00 UTC (rev 8530)
@@ -34,6 +34,7 @@
 #include "key.h"
 #include "ttcommon.h"
 #include "codeconv.h"
+#include "layer_for_unicode.h"
 
 #include <openssl/bn.h>
 #include <openssl/evp.h>
@@ -7730,6 +7731,7 @@
 
 	if (msglen > 0) {
 		char *msg, *msgA;
+		wchar_t *msgW;
 
 		if (pvar->authbanner_buffer == NULL) {
 			pvar->authbanner_buffer = buffer_init();
@@ -7785,10 +7787,10 @@
 			}
 			break;
 		case 2:
-			msgA = ToCharU8(msg);
-			if (msgA) {
-				MessageBox(pvar->cv->HWin, msgA, "Authentication Banner", MB_OK | MB_ICONINFORMATION);
-				free(msgA);
+			msgW = ToWcharU8(msg);
+			if (msgW) {
+				_MessageBoxW(pvar->cv->HWin, msgW, L"Authentication Banner", MB_OK | MB_ICONINFORMATION);
+				free(msgW);
 			}
 			break;
 		case 3:


Ttssh2-commit メーリングリストの案内