- tinc now really does public/private key encryption! It even works, whee!
[tinc] / src / connlist.c
index ed1467f..9da2d6d 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id: connlist.c,v 1.1.2.5 2000/10/16 16:33:29 guus Exp $
+    $Id: connlist.c,v 1.1.2.7 2000/10/20 15:34:34 guus Exp $
 */
 
 #include <syslog.h>
@@ -57,8 +57,8 @@ cp
     free(p->name);
   if(p->hostname)
     free(p->hostname);
-  if(p->public_key)
-    RSA_free(p->public_key);
+  if(p->rsa_key)
+    RSA_free(p->rsa_key);
   if(p->cipher_pktkey)
     free(p->cipher_pktkey);
   if(p->buffer)
@@ -146,8 +146,9 @@ conn_list_t *lookup_id(char *name)
   conn_list_t *p;
 cp
   for(p = conn_list; p != NULL; p = p->next)
-    if(strcmp(name, p->name) == 0)
-      break;
+    if(p->status.active)
+      if(strcmp(name, p->name) == 0)
+        break;
 cp
   return p;
 }