[Ttssh2-commit] [7737] ログを強化して、リスト(bufchain)のバッファサイズを記録するようにした。

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 6月 6日 (木) 20:49:31 JST


Revision: 7737
          https://osdn.net/projects/ttssh2/scm/svn/commits/7737
Author:   yutakapon
Date:     2019-06-06 20:49:30 +0900 (Thu, 06 Jun 2019)
Log Message:
-----------
ログを強化して、リスト(bufchain)のバッファサイズを記録するようにした。
チケット #39297

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

Modified Paths:
--------------
    branches/portfwd_memleak/ttssh2/ttxssh/fwd.c
    branches/portfwd_memleak/ttssh2/ttxssh/ssh.c
    branches/portfwd_memleak/ttssh2/ttxssh/ssh.h

-------------- next part --------------
Modified: branches/portfwd_memleak/ttssh2/ttxssh/fwd.c
===================================================================
--- branches/portfwd_memleak/ttssh2/ttxssh/fwd.c	2019-06-06 11:29:52 UTC (rev 7736)
+++ branches/portfwd_memleak/ttssh2/ttxssh/fwd.c	2019-06-06 11:49:30 UTC (rev 7737)
@@ -792,6 +792,13 @@
 		logprintf(LOG_LEVEL_ERROR, "%s: Can not change local channel(%d) WinSock notification(%d).",
 			__FUNCTION__, channel_num, notify);
 	}
+	else {
+		logprintf(LOG_LEVEL_NOTICE, 
+			"%s: Local channel#%d WinSock notification has been `%s' for flow control(buffer size %lu).",
+			__FUNCTION__, channel_num, 
+			notify ? "enabled" : "disabled",
+			c->bufchain_amount);
+	}
 
 }
 

Modified: branches/portfwd_memleak/ttssh2/ttxssh/ssh.c
===================================================================
--- branches/portfwd_memleak/ttssh2/ttxssh/ssh.c	2019-06-06 11:29:52 UTC (rev 7736)
+++ branches/portfwd_memleak/ttssh2/ttxssh/ssh.c	2019-06-06 11:49:30 UTC (rev 7737)
@@ -257,6 +257,9 @@
 		old->next = p;
 	}
 
+	// \x83o\x83b\x83t\x83@\x83T\x83C\x83Y\x82̍\x87\x8Cv\x82\xF0\x8DX\x90V\x82\xB7\x82\xE9(\x8BL\x98^\x97p)
+	c->bufchain_amount += buflen;
+
 	// remote_window\x82̋󂫂\xAA\x82Ȃ\xA2\x82̂ŁAlocal connection\x82\xA9\x82\xE7\x82̃p\x83P\x83b\x83g\x8E\xF3\x90M\x82\xCC
 	// \x92\xE2\x8E~\x8Ew\x8E\xA6\x82\xF0\x8Fo\x82\xB7\x81B\x82\xB7\x82\xAE\x82ɒʒm\x82\xAA\x8E~\x82܂\xE9\x82킯\x82ł͂Ȃ\xA2\x81B
 	FWD_suspend_resume_local_connection(pvar, c, FALSE);
@@ -287,6 +290,9 @@
 
 		buffer_free(ch->msg);
 		free(ch);
+
+		// \x83o\x83b\x83t\x83@\x83T\x83C\x83Y\x82̍\x87\x8Cv\x82\xF0\x8DX\x90V\x82\xB7\x82\xE9(\x8BL\x98^\x97p)
+		c->bufchain_amount -= size;
 	}
 
 	// \x8C\xB3\x81X\x82\xA0\x82\xC1\x82\xBD\x83\x8A\x83X\x83g\x82\xAA\x8B\xF3\x82ɂȂ\xC1\x82\xBD\x82\xE7\x81A

Modified: branches/portfwd_memleak/ttssh2/ttxssh/ssh.h
===================================================================
--- branches/portfwd_memleak/ttssh2/ttxssh/ssh.h	2019-06-06 11:29:52 UTC (rev 7736)
+++ branches/portfwd_memleak/ttssh2/ttxssh/ssh.h	2019-06-06 11:49:30 UTC (rev 7737)
@@ -881,6 +881,7 @@
 	enum channel_type type;
 	int local_num;
 	bufchain_t *bufchain;
+	unsigned long bufchain_amount;
 	scp_t scp;
 	buffer_t *agent_msg;
 	int agent_request_len;


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