Remove cruft.

This commit is contained in:
Guus Sliepen 2002-03-27 15:26:44 +00:00
parent efd29fde85
commit c6d2f6c620
4 changed files with 5 additions and 26 deletions

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: edge.c,v 1.1.2.9 2002/03/22 13:31:18 guus Exp $ $Id: edge.c,v 1.1.2.10 2002/03/27 15:26:43 guus Exp $
*/ */
#include "config.h" #include "config.h"
@ -189,25 +189,20 @@ void dump_edges(void)
{ {
avl_node_t *node; avl_node_t *node;
edge_t *e; edge_t *e;
char *from_tcp, *from_udp; char *from_udp, *to_udp;
char *to_tcp, *to_udp;
cp cp
syslog(LOG_DEBUG, _("Edges:")); syslog(LOG_DEBUG, _("Edges:"));
for(node = edge_tree->head; node; node = node->next) for(node = edge_tree->head; node; node = node->next)
{ {
e = (edge_t *)node->data; e = (edge_t *)node->data;
// from_tcp = sockaddr2hostname(&e->from.tcpaddress);
from_udp = sockaddr2hostname(&e->from.udpaddress); from_udp = sockaddr2hostname(&e->from.udpaddress);
// to_tcp = sockaddr2hostname(&e->to.tcpaddress);
to_udp = sockaddr2hostname(&e->to.udpaddress); to_udp = sockaddr2hostname(&e->to.udpaddress);
syslog(LOG_DEBUG, _(" %s at %s - %s at %s options %lx weight %d"), syslog(LOG_DEBUG, _(" %s at %s - %s at %s options %lx weight %d"),
e->from.node->name, from_udp, e->from.node->name, from_udp,
e->to.node->name, to_udp, e->to.node->name, to_udp,
e->options, e->weight); e->options, e->weight);
// free(from_tcp);
free(from_udp); free(from_udp);
// free(to_tcp);
free(to_udp); free(to_udp);
} }

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: protocol.c,v 1.28.4.127 2002/03/23 20:12:29 guus Exp $ $Id: protocol.c,v 1.28.4.128 2002/03/27 15:26:43 guus Exp $
*/ */
#include "config.h" #include "config.h"
@ -225,7 +225,6 @@ int (*request_handlers[])(connection_t*) = {
id_h, metakey_h, challenge_h, chal_reply_h, ack_h, id_h, metakey_h, challenge_h, chal_reply_h, ack_h,
status_h, error_h, termreq_h, status_h, error_h, termreq_h,
ping_h, pong_h, ping_h, pong_h,
// add_node_h, del_node_h,
add_subnet_h, del_subnet_h, add_subnet_h, del_subnet_h,
add_edge_h, del_edge_h, add_edge_h, del_edge_h,
key_changed_h, req_key_h, ans_key_h, key_changed_h, req_key_h, ans_key_h,
@ -238,7 +237,6 @@ char (*request_name[]) = {
"ID", "METAKEY", "CHALLENGE", "CHAL_REPLY", "ACK", "ID", "METAKEY", "CHALLENGE", "CHAL_REPLY", "ACK",
"STATUS", "ERROR", "TERMREQ", "STATUS", "ERROR", "TERMREQ",
"PING", "PONG", "PING", "PONG",
// "ADD_NODE", "DEL_NODE",
"ADD_SUBNET", "DEL_SUBNET", "ADD_SUBNET", "DEL_SUBNET",
"ADD_EDGE", "DEL_EDGE", "ADD_EDGE", "DEL_EDGE",
"KEY_CHANGED", "REQ_KEY", "ANS_KEY", "KEY_CHANGED", "REQ_KEY", "ANS_KEY",

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: protocol_auth.c,v 1.1.4.7 2002/03/23 20:21:10 guus Exp $ $Id: protocol_auth.c,v 1.1.4.8 2002/03/27 15:26:44 guus Exp $
*/ */
#include "config.h" #include "config.h"
@ -562,10 +562,8 @@ cp
c->edge = new_edge(); c->edge = new_edge();
cp cp
c->edge->from.node = myself; c->edge->from.node = myself;
// c->edge->from.tcpaddress = str2sockaddr(address, port);
c->edge->from.udpaddress = str2sockaddr(myaddress, myport); c->edge->from.udpaddress = str2sockaddr(myaddress, myport);
c->edge->to.node = n; c->edge->to.node = n;
// c->edge->to.tcpaddress = c->address;
sockaddr2str(&c->address, &hisaddress, &dummy); sockaddr2str(&c->address, &hisaddress, &dummy);
c->edge->to.udpaddress = str2sockaddr(hisaddress, hisport); c->edge->to.udpaddress = str2sockaddr(hisaddress, hisport);
free(hisaddress); free(hisaddress);

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: protocol_edge.c,v 1.1.4.6 2002/03/22 13:31:18 guus Exp $ $Id: protocol_edge.c,v 1.1.4.7 2002/03/27 15:26:44 guus Exp $
*/ */
#include "config.h" #include "config.h"
@ -51,20 +51,14 @@ int send_add_edge(connection_t *c, edge_t *e)
char *from_udpaddress, *from_udpport; char *from_udpaddress, *from_udpport;
char *to_udpaddress, *to_udpport; char *to_udpaddress, *to_udpport;
cp cp
// sockaddr2str(&e->from.tcpaddress, &from_tcpaddress, &from_tcpport);
sockaddr2str(&e->from.udpaddress, &from_udpaddress, &from_udpport); sockaddr2str(&e->from.udpaddress, &from_udpaddress, &from_udpport);
// sockaddr2str(&e->to.tcpaddress, &to_tcpaddress, &to_tcpport);
sockaddr2str(&e->to.udpaddress, &to_udpaddress, &to_udpport); sockaddr2str(&e->to.udpaddress, &to_udpaddress, &to_udpport);
x = send_request(c, "%d %lx %s %s %s %s %s %s %lx %d", ADD_EDGE, random(), x = send_request(c, "%d %lx %s %s %s %s %s %s %lx %d", ADD_EDGE, random(),
e->from.node->name, from_udpaddress, from_udpport, e->from.node->name, from_udpaddress, from_udpport,
e->to.node->name, to_udpaddress, to_udpport, e->to.node->name, to_udpaddress, to_udpport,
e->options, e->weight); e->options, e->weight);
// free(from_tcpaddress);
// free(from_tcpport);
free(from_udpaddress); free(from_udpaddress);
free(from_udpport); free(from_udpport);
// free(to_tcpaddress);
// free(to_tcpport);
free(to_udpaddress); free(to_udpaddress);
free(to_udpport); free(to_udpport);
cp cp
@ -79,10 +73,8 @@ int add_edge_h(connection_t *c)
char from_name[MAX_STRING_SIZE]; char from_name[MAX_STRING_SIZE];
char to_name[MAX_STRING_SIZE]; char to_name[MAX_STRING_SIZE];
char from_address[MAX_STRING_SIZE]; char from_address[MAX_STRING_SIZE];
// char from_tcpport[MAX_STRING_SIZE];
char from_udpport[MAX_STRING_SIZE]; char from_udpport[MAX_STRING_SIZE];
char to_address[MAX_STRING_SIZE]; char to_address[MAX_STRING_SIZE];
// char to_tcpport[MAX_STRING_SIZE];
char to_udpport[MAX_STRING_SIZE]; char to_udpport[MAX_STRING_SIZE];
sockaddr_t from_udpaddress; sockaddr_t from_udpaddress;
sockaddr_t to_udpaddress; sockaddr_t to_udpaddress;
@ -138,9 +130,7 @@ cp
/* Convert addresses */ /* Convert addresses */
// from_tcpaddress = str2sockaddr(from_address, from_tcpport);
from_udpaddress = str2sockaddr(from_address, from_udpport); from_udpaddress = str2sockaddr(from_address, from_udpport);
// to_tcpaddress = str2sockaddr(to_address, to_tcpport);
to_udpaddress = str2sockaddr(to_address, to_udpport); to_udpaddress = str2sockaddr(to_address, to_udpport);
/* Check if edge already exists */ /* Check if edge already exists */
@ -185,10 +175,8 @@ cp
e = new_edge(); e = new_edge();
e->from.node = from; e->from.node = from;
// e->from.tcpaddress = from_tcpaddress;
e->from.udpaddress = from_udpaddress; e->from.udpaddress = from_udpaddress;
e->to.node = to; e->to.node = to;
// e->to.tcpaddress = to_tcpaddress;
e->to.udpaddress = to_udpaddress; e->to.udpaddress = to_udpaddress;
e->options = options; e->options = options;
e->weight = weight; e->weight = weight;