From e67fbad497f140cd44bdb37715221d70c91e8ecd Mon Sep 17 00:00:00 2001 From: Robert Love Date: Wed, 4 Jan 2006 18:06:34 +0000 Subject: [PATCH] misc. compile fixes git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1263 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- .../openvpn/src/nm-openvpn-service-openvpn-helper.c | 3 ++- vpn-daemons/openvpn/src/nm-openvpn-service.c | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c b/vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c index a69271b12c..c82336e14c 100644 --- a/vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c +++ b/vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c @@ -199,7 +199,7 @@ static gboolean send_config_info (DBusConnection *con, * */ - +#if 0 /* FIXME: Nothing uses this and it is static */ /** Prints all environment variables to /tmp/environ */ static void @@ -212,6 +212,7 @@ print_env() } fclose(f); } +#endif /* diff --git a/vpn-daemons/openvpn/src/nm-openvpn-service.c b/vpn-daemons/openvpn/src/nm-openvpn-service.c index 033f37f1c7..3acecc175e 100644 --- a/vpn-daemons/openvpn/src/nm-openvpn-service.c +++ b/vpn-daemons/openvpn/src/nm-openvpn-service.c @@ -438,7 +438,6 @@ static gboolean nm_openvpn_connect_timer_cb (NmOpenVPNData *data) { struct sockaddr_in serv_addr; - int tries = 0; gboolean connected = FALSE; gint socket_fd = -1; NmOpenVPN_IOData *io_data; @@ -1517,10 +1516,11 @@ main( int argc, char *argv[] ) vpn_data->loop = g_main_loop_new (NULL, FALSE); - system ("/sbin/modprobe tun"); + if (system ("/sbin/modprobe tun") == -1) + exit (EXIT_FAILURE); if (!(vpn_data->con = nm_openvpn_dbus_init (vpn_data))) - exit (1); + exit (EXIT_FAILURE); action.sa_handler = sigterm_handler; sigemptyset (&block_mask); @@ -1537,5 +1537,5 @@ main( int argc, char *argv[] ) g_main_loop_unref (vpn_data->loop); g_free (vpn_data); - exit (0); + exit (EXIT_SUCCESS); }