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 3192 by maya, Fri Dec 19 08:02:52 2008 UTC revision 3193 by maya, Fri Dec 19 08:39:04 2008 UTC
# Line 7909  static BOOL handle_SSH2_channel_success( Line 7909  static BOOL handle_SSH2_channel_success(
7909  #else  #else
7910          int wantconfirm = 1; // true          int wantconfirm = 1; // true
7911  #endif  #endif
7912            char buf[128];
7913    
7914          {          _snprintf_s(buf, sizeof(buf), _TRUNCATE,
7915                  char buf[128];                      "SSH2_MSG_CHANNEL_SUCCESS was received(nego_status %d).",
7916                  _snprintf_s(buf, sizeof(buf), _TRUNCATE,                      pvar->session_nego_status);
7917                              "SSH2_MSG_CHANNEL_SUCCESS was received(nego_status %d).",          notify_verbose_message(pvar, buf, LOG_LEVEL_VERBOSE);
                             pvar->session_nego_status);  
                 notify_verbose_message(pvar, buf, LOG_LEVEL_VERBOSE);  
         }  
7918    
7919          if (pvar->session_nego_status == 1) {          if (pvar->session_nego_status == 1) {
7920                  // find channel by shell id(2005.2.27 yutaka)                  // find channel by shell id(2005.2.27 yutaka)
# Line 7973  static BOOL handle_SSH2_channel_success( Line 7971  static BOOL handle_SSH2_channel_success(
7971  static BOOL handle_SSH2_channel_failure(PTInstVar pvar)  static BOOL handle_SSH2_channel_failure(PTInstVar pvar)
7972  {  {
7973          Channel_t *c;          Channel_t *c;
7974            char *data;
7975            int channel_id;
7976            char buf[128];
7977    
7978            data = pvar->ssh_state.payload;
7979            channel_id = get_uint32_MSBfirst(data);
7980    
7981          notify_verbose_message(pvar, "SSH2_MSG_CHANNEL_FAILURE was received.", LOG_LEVEL_VERBOSE);          notify_verbose_message(pvar, "SSH2_MSG_CHANNEL_FAILURE was received.", LOG_LEVEL_VERBOSE);
7982    
7983          if (pvar->session_nego_status == 1) {          c = ssh2_channel_lookup(channel_id);
7984            if (c == NULL) {
7985                    // TODO: error check
7986                    return FALSE;
7987            }
7988    
7989            if (pvar->session_nego_status == 1 && pvar->shell_id == channel_id) {
7990                  // リモートで auth-agent-req@openssh.com がサポートされてないので                  // リモートで auth-agent-req@openssh.com がサポートされてないので
7991                  // エラーは気にせず次へ進む                  // エラーは気にせず次へ進む
7992    
7993                  // find channel by shell id(2005.2.27 yutaka)                  strncpy_s(buf, sizeof(buf),
7994                  c = ssh2_channel_lookup(pvar->shell_id);                            "auth-agent-req@openssh.com is not supported by remote host.",
7995                  if (c == NULL) {                            _TRUNCATE);
7996                          // TODO: error check                  notify_verbose_message(pvar, buf, LOG_LEVEL_VERBOSE);
7997                          return FALSE;  
                 }  
7998                  return send_pty_request(pvar, c);                  return send_pty_request(pvar, c);
7999          }          }
         else {  
                 return TRUE;  
         }  
8000    
8001            ssh2_channel_delete(c);
8002          return TRUE;          return TRUE;
8003  }  }
8004    

Legend:
Removed from v.3192  
changed lines
  Added in v.3193

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