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

Diff for /src/usr.bin/ssh/compat.c between version 1.9 and 1.10

version 1.9, 2000/04/12 06:37:02 version 1.10, 2000/04/12 07:45:43
Line 32 
Line 32 
   
 #include "ssh.h"  #include "ssh.h"
 #include "packet.h"  #include "packet.h"
   #include "xmalloc.h"
   #include "compat.h"
   
 int compat13 = 0;  int compat13 = 0;
 int compat20 = 0;  int compat20 = 0;
Line 70 
Line 72 
                         return;                          return;
                 }                  }
         }          }
   }
   
   #define SEP     ","
   int
   proto_spec(const char *spec)
   {
           char *s = xstrdup(spec);
           char *p;
           int ret = SSH_PROTO_UNKNOWN;
   
           for ((p = strtok(s, SEP)); p; (p = strtok(NULL, SEP))) {
                   switch(atoi(p)) {
                   case 1:
                           if (ret == SSH_PROTO_UNKNOWN)
                                   ret |= SSH_PROTO_1_PREFERRED;
                           ret |= SSH_PROTO_1;
                           break;
                   case 2:
                           ret |= SSH_PROTO_2;
                           break;
                   default:
                           log("ignoring bad proto spec: '%s'.", p);
                           break;
                   }
           }
           xfree(s);
           return ret;
 }  }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10