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

Diff for /src/usr.bin/ssh/ssh-agent.c between version 1.156 and 1.157

version 1.156, 2007/09/09 11:38:01 version 1.157, 2007/09/25 23:48:57
Line 444 
Line 444 
 process_add_identity(SocketEntry *e, int version)  process_add_identity(SocketEntry *e, int version)
 {  {
         Idtab *tab = idtab_lookup(version);          Idtab *tab = idtab_lookup(version);
           Identity *id;
         int type, success = 0, death = 0, confirm = 0;          int type, success = 0, death = 0, confirm = 0;
         char *type_name, *comment;          char *type_name, *comment;
         Key *k = NULL;          Key *k = NULL;
Line 526 
Line 527 
         }          }
         if (lifetime && !death)          if (lifetime && !death)
                 death = time(NULL) + lifetime;                  death = time(NULL) + lifetime;
         if (lookup_identity(k, version) == NULL) {          if ((id = lookup_identity(k, version)) == NULL) {
                 Identity *id = xmalloc(sizeof(Identity));                  id = xmalloc(sizeof(Identity));
                 id->key = k;                  id->key = k;
                 id->comment = comment;  
                 id->death = death;  
                 id->confirm = confirm;  
                 TAILQ_INSERT_TAIL(&tab->idlist, id, next);                  TAILQ_INSERT_TAIL(&tab->idlist, id, next);
                 /* Increment the number of identities. */                  /* Increment the number of identities. */
                 tab->nentries++;                  tab->nentries++;
         } else {          } else {
                 key_free(k);                  key_free(k);
                 xfree(comment);                  xfree(id->comment);
         }          }
           id->comment = comment;
           id->death = death;
           id->confirm = confirm;
 send:  send:
         buffer_put_int(&e->output, 1);          buffer_put_int(&e->output, 1);
         buffer_put_char(&e->output,          buffer_put_char(&e->output,

Legend:
Removed from v.1.156  
changed lines
  Added in v.1.157