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 5838 by yutakapon, Sun Apr 26 14:46:48 2015 UTC revision 5841 by yutakapon, Thu Apr 30 16:27:29 2015 UTC
# Line 4211  char* get_ssh2_comp_name(compression_typ Line 4211  char* get_ssh2_comp_name(compression_typ
4211  char* get_ssh_keytype_name(ssh_keytype type)  char* get_ssh_keytype_name(ssh_keytype type)
4212  {  {
4213          ssh2_host_key_t *ptr = ssh2_host_key;          ssh2_host_key_t *ptr = ssh2_host_key;
4214          static char buf[32];          char *p = "ssh-unknown";
4215    
4216          while (ptr->name != NULL) {          while (ptr->name != NULL) {
4217                  if (type == ptr->type) {                  if (type == ptr->type) {
4218                          strncpy_s(buf, sizeof(buf), ptr->name, _TRUNCATE);                          // ssh2_host_key[]はグローバル変数なので、そのまま返り値にできる。
4219                            p = ptr->name;
4220                          break;                          break;
4221                  }                  }
4222                  ptr++;                  ptr++;
4223          }          }
4224          return buf;          return p;
4225  }  }
4226    
4227    

Legend:
Removed from v.5838  
changed lines
  Added in v.5841

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