[network-manager-openconnect/NM_0_8] Build against NetworkManager 0.8.1 again



commit 430b2fb6510118c97e2094a8d69debb444ad9a57
Author: David Woodhouse <David Woodhouse intel com>
Date:   Thu Jun 21 14:47:02 2012 +0100

    Build against NetworkManager 0.8.1 again

 auth-dialog/main.c                              |    9 ++++++---
 configure.ac                                    |   10 +++++-----
 src/nm-openconnect-service-openconnect-helper.c |   22 ++++------------------
 3 files changed, 15 insertions(+), 26 deletions(-)
---
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index ea728b6..1c244e5 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -30,6 +30,7 @@
 #include <string.h>
 #include <errno.h>
 #include <unistd.h>
+#include <fcntl.h>
 #define _GNU_SOURCE
 #include <getopt.h>
 
@@ -40,7 +41,6 @@
 
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
-#include <glib-unix.h>
 
 #include "auth-dlg-settings.h"
 
@@ -1496,8 +1496,11 @@ static auth_ui_data *init_ui_data (char *vpn_name)
 		ui_data->cancel_pipes[0] = -1;
 		ui_data->cancel_pipes[1] = -1;
 	}
-	g_unix_set_fd_nonblocking(ui_data->cancel_pipes[0], TRUE, NULL);
-	g_unix_set_fd_nonblocking(ui_data->cancel_pipes[1], TRUE, NULL);
+
+	fcntl(ui_data->cancel_pipes[0], F_SETFL,
+	      fcntl(ui_data->cancel_pipes[0], F_GETFL) | O_NONBLOCK);
+	fcntl(ui_data->cancel_pipes[1], F_SETFL,
+	      fcntl(ui_data->cancel_pipes[1], F_GETFL) | O_NONBLOCK);
 
 	ui_data->vpninfo = (void *)openconnect_vpninfo_new("OpenConnect VPN Agent (NetworkManager)",
 							   validate_peer_cert, write_new_config,
diff --git a/configure.ac b/configure.ac
index a7f864f..8762b8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,7 +60,7 @@ PKG_CHECK_MODULES(LIBXML, libxml-2.0)
 AC_SUBST(LIBXML_CFLAGS)
 AC_SUBST(LIBXML_LIBS)
 
-PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.74)
+PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.73)
 AC_SUBST(DBUS_CFLAGS)
 AC_SUBST(DBUS_LIBS)
 
@@ -85,10 +85,10 @@ if test x"$with_gnome" != xno; then
 fi
 
 PKG_CHECK_MODULES(NETWORKMANAGER,
-                  NetworkManager >= 0.8.6
-                  libnm-util >= 0.8.6
-                  libnm-glib  >= 0.8.6
-                  libnm-glib-vpn >= 0.8.6)
+                  NetworkManager >= 0.7.0
+                  libnm-util >= 0.7.0
+                  libnm_glib  >= 0.7.0
+                  libnm_glib_vpn >= 0.7.0)
 AC_SUBST(NETWORKMANAGER_CFLAGS)
 AC_SUBST(NETWORKMANAGER_LIBS)
 
diff --git a/src/nm-openconnect-service-openconnect-helper.c b/src/nm-openconnect-service-openconnect-helper.c
index c195d46..2df4e76 100644
--- a/src/nm-openconnect-service-openconnect-helper.c
+++ b/src/nm-openconnect-service-openconnect-helper.c
@@ -15,10 +15,10 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- *   Copyright  2008 - 2010 Intel Corporation.
+ *   Copyright  2008 - 2009 Intel Corporation.
  *
  * Based on nm-openconnect-vpnc.c:
- *   Copyright  2005 - 2010 Red Hat, Inc.
+ *   Copyright  2005 - 2008 Red Hat, Inc.
  *   Copyright  2007 - 2008 Novell, Inc.
  */
 
@@ -136,17 +136,6 @@ uint_to_gvalue (guint32 num)
 }
 
 static GValue *
-bool_to_gvalue (gboolean b)
-{
-	GValue *val;
-
-	val = g_slice_new0 (GValue);
-	g_value_init (val, G_TYPE_BOOLEAN);
-	g_value_set_boolean (val, b);
-	return val;
-}
-
-static GValue *
 addr_to_gvalue (const char *str)
 {
 	struct in_addr	temp_addr;
@@ -373,12 +362,9 @@ main (int argc, char *argv[])
 
 	/* Routes */
 	val = get_routes ();
-	if (val) {
+	if (val)
 		g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_ROUTES, val);
-		/* If routes-to-include were provided, that means no default route */
-		g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_NEVER_DEFAULT,
-		                     bool_to_gvalue (TRUE));
-	}
+
 	/* Banner */
 	val = str_to_gvalue (getenv ("CISCO_BANNER"), TRUE);
 	if (val)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]