[BACK]Return to ssh-keyscan.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/ssh-keyscan.c between version 1.56 and 1.57

version 1.56, 2005/09/13 23:40:07 version 1.57, 2005/10/30 04:01:03
Line 490 
Line 490 
         size_t bufsiz;          size_t bufsiz;
         con *c = &fdcon[s];          con *c = &fdcon[s];
   
         bufsiz = sizeof(buf);          for (;;) {
         cp = buf;                  memset(buf, '\0', sizeof(buf));
         while (bufsiz-- && (n = atomicio(read, s, cp, 1)) == 1 && *cp != '\n') {                  bufsiz = sizeof(buf);
                 if (*cp == '\r')                  cp = buf;
                         *cp = '\n';                  while (bufsiz-- &&
                 cp++;                      (n = atomicio(read, s, cp, 1)) == 1 && *cp != '\n') {
                           if (*cp == '\r')
                                   *cp = '\n';
                           cp++;
                   }
                   if (n != 1 || strncmp(buf, "SSH-", 4) == 0)
                           break;
         }          }
         if (n == 0) {          if (n == 0) {
                 switch (errno) {                  switch (errno) {

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57