[network-manager-libreswan/lr/multiple-vpn: 1/9] service: don't assert there's connection for all steps



commit b3ea039c3aaac0c22395282c6f6fe95653ba094a
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Wed Nov 4 13:46:17 2015 +0100

    service: don't assert there's connection for all steps
    
    connect_failed() clears it.
    
    ** Message: Connect: step 0
    (nm-libreswan-service:1279): libnm-CRITICAL **: nm_connection_get_uuid: assertion 'NM_IS_CONNECTION 
(connection)' failed

 src/nm-libreswan-service.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/nm-libreswan-service.c b/src/nm-libreswan-service.c
index 98173e1..f61733f 100644
--- a/src/nm-libreswan-service.c
+++ b/src/nm-libreswan-service.c
@@ -1047,7 +1047,6 @@ connect_step (NMLibreswanPlugin *self, GError **error)
        DEBUG ("Connect: step %d", priv->connect_step);
 
        uuid = nm_connection_get_uuid (priv->connection);
-       g_assert (uuid);
 
        switch (priv->connect_step) {
        case CONNECT_STEP_FIRST:
@@ -1101,6 +1100,7 @@ connect_step (NMLibreswanPlugin *self, GError **error)
                return TRUE;
 
        case CONNECT_STEP_CONFIG_ADD:
+               g_assert (uuid);
                if (!do_spawn (&priv->pid, &fd, NULL, error, priv->ipsec_path,
                               "auto", "--replace", "--config", "-", uuid, NULL))
                        return FALSE;
@@ -1110,6 +1110,7 @@ connect_step (NMLibreswanPlugin *self, GError **error)
                return TRUE;
 
        case CONNECT_STEP_CONNECT:
+               g_assert (uuid);
                if (!spawn_pty (&up_stdout, &up_stderr, &up_pty, &priv->pid, error,
                                priv->ipsec_path, "auto", "--up", uuid, NULL))
                        return FALSE;


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