Develop and Download Open Source Software

Browse Subversion Repository

Diff of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/ssh.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4475 by maya, Fri May 27 14:44:18 2011 UTC revision 4476 by maya, Mon May 30 13:04:11 2011 UTC
# Line 7212  static BOOL handle_SSH2_open_failure(PTI Line 7212  static BOOL handle_SSH2_open_failure(PTI
7212          free(cstring);          free(cstring);
7213    
7214          // 転送チャネル内にあるソケットの解放漏れを修正 (2007.7.26 maya)          // 転送チャネル内にあるソケットの解放漏れを修正 (2007.7.26 maya)
7215          FWD_free_channel(pvar, c->local_num);          if (c->type == TYPE_PORTFWD) {
7216                    FWD_free_channel(pvar, c->local_num);
7217            }
7218    
7219          // チャネルの解放漏れを修正 (2007.5.1 maya)          // チャネルの解放漏れを修正 (2007.5.1 maya)
7220          ssh2_channel_delete(c);          ssh2_channel_delete(c);
# Line 8165  static BOOL handle_SSH2_channel_open(PTI Line 8167  static BOOL handle_SSH2_channel_open(PTI
8167    
8168          } else if (strcmp(ctype, "auth-agent@openssh.com") == 0) { // agent forwarding          } else if (strcmp(ctype, "auth-agent@openssh.com") == 0) { // agent forwarding
8169                  if (pvar->agentfwd_enable && FWD_agent_forward_confirm(pvar)) {                  if (pvar->agentfwd_enable && FWD_agent_forward_confirm(pvar)) {
8170                          c = ssh2_channel_new(CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, TYPE_AGENT, chan_num);                          c = ssh2_channel_new(CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, TYPE_AGENT, -1);
8171                          if (c == NULL) {                          if (c == NULL) {
8172                                  UTIL_get_lang_msg("MSG_SSH_NO_FREE_CHANNEL", pvar,                                  UTIL_get_lang_msg("MSG_SSH_NO_FREE_CHANNEL", pvar,
8173                                                    "Could not open new channel. TTSSH is already opening too many channels.");                                                    "Could not open new channel. TTSSH is already opening too many channels.");
# Line 8275  static BOOL handle_SSH2_channel_close(PT Line 8277  static BOOL handle_SSH2_channel_close(PT
8277          } else if (c->type == TYPE_SCP) {          } else if (c->type == TYPE_SCP) {
8278                  ssh2_channel_delete(c);                  ssh2_channel_delete(c);
8279    
8280          } else {          } else if (c->type == TYPE_AGENT) {
8281                    ssh2_channel_delete(c);
8282    
8283            } else { // TYPE_PORTFWD
8284                  ssh2_channel_delete(c);                  ssh2_channel_delete(c);
8285    
8286          }          }
# Line 8296  static BOOL handle_SSH2_channel_request( Line 8301  static BOOL handle_SSH2_channel_request(
8301          char *emsg = "exit-status";          char *emsg = "exit-status";
8302          int estat = 0;          int estat = 0;
8303          Channel_t *c;          Channel_t *c;
8304            char log[128];
         notify_verbose_message(pvar, "SSH2_MSG_CHANNEL_REQUEST was received.", LOG_LEVEL_VERBOSE);  
8305    
8306          // 6byte(サイズ+パディング+タイプ)を取り除いた以降のペイロード          // 6byte(サイズ+パディング+タイプ)を取り除いた以降のペイロード
8307          data = pvar->ssh_state.payload;          data = pvar->ssh_state.payload;
# Line 8323  static BOOL handle_SSH2_channel_request( Line 8327  static BOOL handle_SSH2_channel_request(
8327          reply = data[0];          reply = data[0];
8328          data += 1;          data += 1;
8329    
8330            _snprintf_s(log, sizeof(log), _TRUNCATE, "SSH2_MSG_CHANNEL_REQUEST was received. local:%d remote:%d %s reply:%d", c->self_id, c->remote_id, str, reply);
8331            notify_verbose_message(pvar, log, LOG_LEVEL_VERBOSE);
8332    
8333          // 終了コードが含まれているならば          // 終了コードが含まれているならば
8334          if (memcmp(str, emsg, strlen(emsg)) == 0) {          if (memcmp(str, emsg, strlen(emsg)) == 0) {
8335                  success = 1;                  success = 1;

Legend:
Removed from v.4475  
changed lines
  Added in v.4476

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26