From: Guus Sliepen Date: Sat, 4 Nov 2000 11:49:58 +0000 (+0000) Subject: - Removed even more warnings. X-Git-Tag: release-1.0pre3~29 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=ed0bf283e37642f9f7673f664713a16d916bd70f;p=tinc - Removed even more warnings. --- diff --git a/src/connlist.c b/src/connlist.c index 89b11fbe..105049ef 100644 --- a/src/connlist.c +++ b/src/connlist.c @@ -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.12 2000/11/03 22:35:10 zarq Exp $ + $Id: connlist.c,v 1.1.2.13 2000/11/04 11:49:56 guus Exp $ */ #include "config.h" @@ -26,6 +26,7 @@ #include #include "net.h" /* Don't ask. */ +#include "netutl.h" #include "config.h" #include "conf.h" #include diff --git a/src/connlist.h b/src/connlist.h index 8f974c97..0b9fa6b3 100644 --- a/src/connlist.h +++ b/src/connlist.h @@ -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.h,v 1.1.2.10 2000/11/03 22:35:10 zarq Exp $ + $Id: connlist.h,v 1.1.2.11 2000/11/04 11:49:57 guus Exp $ */ #ifndef __TINC_CONNLIST_H__ @@ -56,7 +56,7 @@ typedef struct conn_list_t { char *hostname; /* the hostname of its real ip */ short unsigned int port; /* his portnumber */ int protocol_version; /* used protocol */ - long int options; /* options turned on for this connection */ + long unsigned int options; /* options turned on for this connection */ int flags; /* his flags */ int socket; /* our udp vpn socket */ diff --git a/src/net.c b/src/net.c index fb15b5ee..f8f84bcd 100644 --- a/src/net.c +++ b/src/net.c @@ -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: net.c,v 1.35.4.59 2000/11/04 10:37:27 guus Exp $ + $Id: net.c,v 1.35.4.60 2000/11/04 11:49:57 guus Exp $ */ #include "config.h" @@ -903,7 +903,6 @@ cp void close_network_connections(void) { conn_list_t *p; - char *scriptname; cp for(p = conn_list; p != NULL; p = p->next) { @@ -920,10 +919,11 @@ cp myself = NULL; } - /* Execute tinc-down script right before shutting down the interface */ + close(tap_fd); + + /* Execute tinc-down script right after shutting down the interface */ execute_script("tinc-down"); - close(tap_fd); destroy_conn_list(); syslog(LOG_NOTICE, _("Terminating")); diff --git a/src/netutl.h b/src/netutl.h index aed4ad78..0ce22d42 100644 --- a/src/netutl.h +++ b/src/netutl.h @@ -16,7 +16,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: netutl.h,v 1.2.4.3 2000/10/11 22:01:00 guus Exp $ + $Id: netutl.h,v 1.2.4.4 2000/11/04 11:49:58 guus Exp $ */ #ifndef __TINC_NETUTL_H__ @@ -25,6 +25,7 @@ #include "net.h" #include "conf.h" +extern void destroy_queue(packet_queue_t *); extern char *hostlookup(unsigned long); extern ip_mask_t *strtoip(char*); diff --git a/src/subnet.c b/src/subnet.c index 9fceea8e..15ae528e 100644 --- a/src/subnet.c +++ b/src/subnet.c @@ -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: subnet.c,v 1.1.2.9 2000/11/03 22:35:12 zarq Exp $ + $Id: subnet.c,v 1.1.2.10 2000/11/04 11:49:58 guus Exp $ */ #include "config.h" @@ -221,7 +221,7 @@ cp asprintf(&netstr, "%d,%lx/%lx", subnet->type, subnet->net.ipv4.address, subnet->net.ipv4.mask); break; case SUBNET_IPV6: - asprintf(&netstr, "%d,%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx/%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx", + asprintf(&netstr, "%d,%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx/%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx", subnet->type, subnet->net.ipv6.address.x[0], subnet->net.ipv6.address.x[1], subnet->net.ipv6.address.x[2],