When trying to talk to a host that is in the netmask of a tinc server but
[tinc] / src / net.c
index 1130fa9..8b340c2 100644 (file)
--- a/src/net.c
+++ b/src/net.c
@@ -185,9 +185,8 @@ cp
 }
 
 /* Remove a queue element */
-void del_queue(packet_queue_t **q, packet_element_t *e)
+void del_queue(packet_queue_t **q, queue_element_t *e)
 {
-  queue_element_t *p, *n;
 cp
   free(e->packet);
 
@@ -230,7 +229,7 @@ cp
 void flush_queue(conn_list_t *cl, packet_queue_t **pq,
                 int (*function)(conn_list_t*,void*))
 {
-  queue_element_t *p, *prev = NULL, *next = NULL;
+  queue_element_t *p, *next = NULL;
 cp
   for(p = (*pq)->head; p != NULL; )
     {
@@ -307,7 +306,7 @@ cp
     {
       add_queue(&(cl->sq), packet, packet->len + 2);
       if(!cl->status.waitingforkey)
-       send_key_request(to);
+       send_key_request(cl->vpn_ip);                   /* Keys should be sent to the host running the tincd */
       return 0;
     }