[Ttssh2-commit] [5832] want-reply を見て返事を返す

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2015年 3月 27日 (金) 18:05:42 JST


Revision: 5832
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5832
Author:   maya
Date:     2015-03-27 18:05:42 +0900 (Fri, 27 Mar 2015)
Log Message:
-----------
want-reply を見て返事を返す

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

-------------- next part --------------
Modified: trunk/ttssh2/ttxssh/ssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ssh.c	2015-03-27 09:04:12 UTC (rev 5831)
+++ trunk/ttssh2/ttxssh/ssh.c	2015-03-27 09:05:42 UTC (rev 5832)
@@ -7452,14 +7452,19 @@
 	}
 	free(rtype);
 
-	msg = buffer_init();
-	if (msg) {
-		len = buffer_len(msg);
-		type = success ? SSH2_MSG_REQUEST_SUCCESS : SSH2_MSG_REQUEST_FAILURE;
-		outmsg = begin_send_packet(pvar, type, len);
-		memcpy(outmsg, buffer_ptr(msg), len);
-		finish_send_packet(pvar);
-		buffer_free(msg);
+	if (want_reply) {
+		msg = buffer_init();
+		if (msg) {
+			len = buffer_len(msg);
+			type = success ? SSH2_MSG_REQUEST_SUCCESS : SSH2_MSG_REQUEST_FAILURE;
+			if (type == SSH2_MSG_REQUEST_SUCCESS) {
+				// TBD
+			}
+			outmsg = begin_send_packet(pvar, type, len);
+			memcpy(outmsg, buffer_ptr(msg), len);
+			finish_send_packet(pvar);
+			buffer_free(msg);
+		}
 	}
 
 	return TRUE;



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