On 10/11/2012 10:37 PM, Murilo Opsfelder Araujo wrote:
Signed-off-by: Murilo Opsfelder Araujo<[email protected]>
---
  auth-dialog/main.c                              |  9 ++++++---
  configure.ac                                    |  8 ++++----
  src/nm-openconnect-service-openconnect-helper.c | 18 ++----------------
  3 files changed, 12 insertions(+), 23 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..e8617eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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.8.1
+                  libnm-util>= 0.8.1
+                  libnm-glib>= 0.8.1
+                  libnm-glib-vpn>= 0.8.1)
  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..861ed6b 100644
--- a/src/nm-openconnect-service-openconnect-helper.c
+++ b/src/nm-openconnect-service-openconnect-helper.c
@@ -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)

Just for the record, this patch was created against branch NM_0_8.

--
Murilo

_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to