[Ttssh2-commit] [8382] 接続するまで TTSSH.LOG に記録されるログの PID が正しく無いのを修正

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 11月 21日 (木) 20:29:42 JST


Revision: 8382
          https://osdn.net/projects/ttssh2/scm/svn/commits/8382
Author:   doda
Date:     2019-11-21 20:29:42 +0900 (Thu, 21 Nov 2019)
Log Message:
-----------
接続するまで TTSSH.LOG に記録されるログの PID が正しく無いのを修正

Ticket: #39776

問題:
  TTSSH.LOG で、接続するまでの間のログの PID が正しくない値になる。

原因:
  PID を pvar->cv->HWin を元に GetWindowThreadProcessId() を使って取得
  していたが、 接続するまでは pvar->cv->HWin に値が設定されていない為。

対処:
  プロセスIDを GetCurrentProcessId() を使って取得するように変更した。

Ticket Links:
------------
    https://osdn.net/projects/ttssh2/tracker/detail/39776

Modified Paths:
--------------
    trunk/doc/en/html/about/history.html
    trunk/doc/ja/html/about/history.html
    trunk/ttssh2/ttxssh/ttxssh.c

-------------- next part --------------
Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2019-11-21 11:29:37 UTC (rev 8381)
+++ trunk/doc/en/html/about/history.html	2019-11-21 11:29:42 UTC (rev 8382)
@@ -3244,6 +3244,7 @@
       <li>The problem is improved in the user authentication dialog that the delay occurs when the focus is moved from the user name to passphrase by using TAB key after entering the user name.</li>
       <li>When the user name is left blank in the user authentication dialog, the focus may not be moved from the user name to the pull-down menu on the right side with TAB key.</li>
       <li>Fixed a port forwarding issue that closes the client connection before completing all data transmission.</li>
+      <li>Incorrect process ID is recorded in TTSSH.LOG before connecting.</li>
     </ul>
   </li>
 

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2019-11-21 11:29:37 UTC (rev 8381)
+++ trunk/doc/ja/html/about/history.html	2019-11-21 11:29:42 UTC (rev 8382)
@@ -3250,6 +3250,7 @@
       <li>\x83\x86\x81[\x83U\x94F\x8F؃_\x83C\x83A\x83\x8D\x83O\x82ŁA\x83\x86\x81[\x83U\x96\xBC\x82\xF0\x93\xFC\x97͌\xE3\x82\xCCTAB\x83L\x81[\x82Ńp\x83X\x83t\x83\x8C\x81[\x83Y\x97\x93\x82ւ̈ړ\xAE\x82ɒx\x89\x84\x82\xAA\x82\xA0\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x89\xFC\x91P\x82\xB5\x82\xBD\x81B</li>
       <li>\x83\x86\x81[\x83U\x94F\x8F؃_\x83C\x83A\x83\x8D\x83O\x82ŁA\x83\x86\x81[\x83U\x96\xBC\x82\xF0\x8B󗓂ɂ\xB5\x82\xBD\x8C\xE3\x81ATAB\x83L\x81[\x82ʼnE\x91\xA4\x82̃v\x83\x8B\x83_\x83E\x83\x93\x83\x81\x83j\x83\x85\x81[\x82Ƀt\x83H\x81[\x83J\x83X\x88ړ\xAE\x82\xB5\x82Ȃ\xA2\x82\xB1\x82Ƃ\xAA\x82\xA0\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
       <li>\x83|\x81[\x83g\x93]\x91\x97\x82ŁA\x83N\x83\x89\x83C\x83A\x83\x93\x83g\x82Ƀf\x81[\x83^\x82𑗂\xE8\x8FI\x82\xED\x82\xE9\x91O\x82ɐڑ\xB1\x82\xF0\x90ؒf\x82\xB7\x82\xE9\x8Fꍇ\x82\xAA\x82\xA0\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+      <li>\x90ڑ\xB1\x82\xB7\x82\xE9\x82܂ł̊ԁA\x90\xB3\x82\xB5\x82\xAD\x82Ȃ\xA2\x83v\x83\x8D\x83Z\x83XID\x82\xAATTSSH.LOG\x82ɋL\x98^\x82\xB3\x82\xEA\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
 

Modified: trunk/ttssh2/ttxssh/ttxssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.c	2019-11-21 11:29:37 UTC (rev 8381)
+++ trunk/ttssh2/ttxssh/ttxssh.c	2019-11-21 11:29:42 UTC (rev 8382)
@@ -994,7 +994,7 @@
 			char tmp[26];
 
 			_write(file, strtime, strlen(strtime));
-			GetWindowThreadProcessId(pvar->cv->HWin, &processid);
+			processid = GetCurrentProcessId();
 			_snprintf_s(tmp, sizeof(tmp), _TRUNCATE, " [%lu] ",processid);
 			_write(file, tmp, strlen(tmp));
 			_write(file, msg, strlen(msg));


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