X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fconnection.c;h=9890f51f16275db1cf746612d3552f8490746e07;hp=4d6e30b2c3f0d2d6726ed05582208e7f5bb63e26;hb=e449d94caef963809d417f16497f6f978e10d731;hpb=0b9175e998c2180e5d73ef3d644a49d620c68cad diff --git a/src/connection.c b/src/connection.c index 4d6e30b2..9890f51f 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1,7 +1,7 @@ /* connection.c -- connection list management - Copyright (C) 2000-2002 Guus Sliepen , - 2000-2002 Ivo Timmermans + Copyright (C) 2000-2003 Guus Sliepen , + 2000-2003 Ivo Timmermans This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,32 +17,25 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: connection.c,v 1.1.2.37 2003/07/06 22:11:31 guus Exp $ + $Id: connection.c,v 1.1.2.40 2003/07/17 15:06:26 guus Exp $ */ -#include "config.h" - -#include -#include -#include - -#include -#include +#include "system.h" +#include "avl_tree.h" +#include "conf.h" +#include "list.h" +#include "logger.h" #include "net.h" /* Don't ask. */ #include "netutl.h" -#include "conf.h" -#include #include "subnet.h" -#include "logger.h" - +#include "utils.h" #include "xalloc.h" -#include "system.h" avl_tree_t *connection_tree; /* Meta connections */ connection_t *broadcast; -int connection_compare(connection_t *a, connection_t *b) +static int connection_compare(connection_t *a, connection_t *b) { return (void *)a - (void *)b; } @@ -124,15 +117,15 @@ void dump_connections(void) cp(); - logger(DEBUG_ALWAYS, LOG_DEBUG, _("Connections:")); + logger(LOG_DEBUG, _("Connections:")); for(node = connection_tree->head; node; node = node->next) { c = (connection_t *) node->data; - logger(DEBUG_ALWAYS, LOG_DEBUG, _(" %s at %s options %lx socket %d status %04x"), + logger(LOG_DEBUG, _(" %s at %s options %lx socket %d status %04x"), c->name, c->hostname, c->options, c->socket, c->status); } - logger(DEBUG_ALWAYS, LOG_DEBUG, _("End of connections.")); + logger(LOG_DEBUG, _("End of connections.")); } int read_connection_config(connection_t *c)