[network-manager-iodine: 2/10] Fail properly when we failed to parse IPv4 config




commit b4733d07750dcaeec369351ab6f4628e5d5ecc38
Author: Guido Günther <agx sigxcpu org>
Date:   Sun Feb 5 12:38:58 2017 +0100

    Fail properly when we failed to parse IPv4 config

 src/nm-iodine-service.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/nm-iodine-service.c b/src/nm-iodine-service.c
index 705d4fe..2359363 100644
--- a/src/nm-iodine-service.c
+++ b/src/nm-iodine-service.c
@@ -396,6 +396,11 @@ iodine_stderr_cb (GIOChannel *source, GIOCondition condition, gpointer plugin)
                g_message("Parsing done, sending IP4 config");
                nm_vpn_service_plugin_set_ip4_config(plugin,
                                                     g_variant_builder_end (&priv->ip4config));
+       } else if (ret < 0) {
+               nm_vpn_service_plugin_failure (NM_VPN_SERVICE_PLUGIN (plugin),
+                                                                          
NM_VPN_PLUGIN_FAILURE_BAD_IP_CONFIG);
+               g_variant_builder_end (&priv->ip4config);
+               return FALSE;
        }
        g_free (line);
        return TRUE;


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