[network-manager-vpnc] helper: fix generation of routes
- From: Beniamino Galvani <bgalvani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-vpnc] helper: fix generation of routes
- Date: Mon, 2 Nov 2015 10:29:36 +0000 (UTC)
commit 2513adb32447a3f21ad5ef9477698adbd5b8720b
Author: Beniamino Galvani <bgalvani redhat com>
Date: Fri Oct 23 17:44:54 2015 +0200
helper: fix generation of routes
When only one route was receive it was not added to IP configuration.
Fixes: 1c8d9d35a24253f9fcd0ce866962a80e0c706066
src/nm-vpnc-service-vpnc-helper.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/nm-vpnc-service-vpnc-helper.c b/src/nm-vpnc-service-vpnc-helper.c
index 4d4a973..0f9a901 100644
--- a/src/nm-vpnc-service-vpnc-helper.c
+++ b/src/nm-vpnc-service-vpnc-helper.c
@@ -158,8 +158,7 @@ get_ip4_routes (void)
GVariantBuilder builder;
GVariant *value;
char *tmp;
- int num;
- int i;
+ int num, i, size = 0;
#define BUFLEN 256
@@ -217,10 +216,11 @@ get_ip4_routes (void)
g_variant_builder_add_value (&array, g_variant_new_uint32 (next_hop));
g_variant_builder_add_value (&array, g_variant_new_uint32 (metric));
g_variant_builder_add_value (&builder, g_variant_builder_end (&array));
+ size++;
}
value = g_variant_builder_end (&builder);
- if (i > 1)
+ if (size > 0)
return value;
g_variant_unref (value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]