diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2011-11-15 13:06:30 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-11-15 13:41:45 +0100 |
commit | 35afa7e08162c76c5660a9dc6626bb103b99c1ea (patch) | |
tree | d7fbd372fa8a896413f56f5414eb7d014d493df1 | |
parent | 53ef9468851ecc538d7d1d668494e0a99d56a60c (diff) | |
download | connman-35afa7e08162c76c5660a9dc6626bb103b99c1ea.tar.gz connman-35afa7e08162c76c5660a9dc6626bb103b99c1ea.tar.bz2 connman-35afa7e08162c76c5660a9dc6626bb103b99c1ea.zip |
pptp: Config save support added
-rw-r--r-- | plugins/pptp.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/pptp.c b/plugins/pptp.c index f969d1bb..37e84593 100644 --- a/plugins/pptp.c +++ b/plugins/pptp.c @@ -201,6 +201,23 @@ static int pptp_notify(DBusMessage *msg, struct connman_provider *provider) return VPN_STATE_CONNECT; } +static int pptp_save(struct connman_provider *provider, GKeyFile *keyfile) +{ + const char *option; + int i; + + for (i = 0; i < (int)ARRAY_SIZE(pptp_options); i++) { + if (strncmp(pptp_options[i].cm_opt, "PPTP.", 5) == 0) { + option = connman_provider_get_string(provider, + pptp_options[i].cm_opt); + g_key_file_set_string(keyfile, + connman_provider_get_save_group(provider), + pptp_options[i].cm_opt, option); + } + } + return 0; +} + static void pptp_write_bool_option(struct connman_task *task, const char *key, const char *value) { @@ -295,6 +312,7 @@ static struct vpn_driver vpn_driver = { .notify = pptp_notify, .connect = pptp_connect, .error_code = pptp_error_code, + .save = pptp_save, }; static int pptp_init(void) |