l2tp: Header file was missing
[platform/upstream/connman.git] / vpn / plugins / l2tp.c
index 9729a75..15f5128 100644 (file)
@@ -49,6 +49,7 @@
 #include <connman/vpn-dbus.h>
 
 #include "../vpn-provider.h"
+#include "../vpn-agent.h"
 
 #include "vpn.h"
 
@@ -271,12 +272,6 @@ static int l2tp_save(struct vpn_provider *provider, GKeyFile *keyfile)
                }
        }
 
-       option = vpn_provider_get_string(provider, "L2TP.Password");
-       if (option != NULL)
-               g_key_file_set_string(keyfile,
-                                       vpn_provider_get_save_group(provider),
-                                       "L2TP.Password", option);
-
        return 0;
 }
 
@@ -749,12 +744,18 @@ static int l2tp_error_code(int exit_code)
        }
 }
 
+static void l2tp_disconnect(struct vpn_provider *provider)
+{
+       vpn_provider_set_string(provider, "L2TP.Password", NULL);
+}
+
 static struct vpn_driver vpn_driver = {
        .flags          = VPN_FLAG_NO_TUN,
        .notify         = l2tp_notify,
        .connect        = l2tp_connect,
        .error_code     = l2tp_error_code,
        .save           = l2tp_save,
+       .disconnect     = l2tp_disconnect,
 };
 
 static int l2tp_init(void)