summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/provider.h2
-rw-r--r--src/provider.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/include/provider.h b/include/provider.h
index d0e8c351..af121d04 100644
--- a/include/provider.h
+++ b/include/provider.h
@@ -22,6 +22,7 @@
#ifndef __CONNMAN_PROVIDER_H
#define __CONNMAN_PROVIDER_H
+#include <glib.h>
#include <connman/types.h>
#ifdef __cplusplus
@@ -97,6 +98,7 @@ struct connman_provider_driver {
int (*remove) (struct connman_provider *provider);
int (*connect) (struct connman_provider *provider);
int (*disconnect) (struct connman_provider *provider);
+ int (*save) (struct connman_provider *provider, GKeyFile *keyfile);
};
int connman_provider_driver_register(struct connman_provider_driver *driver);
diff --git a/src/provider.c b/src/provider.c
index 487c7cdb..321bfcc5 100644
--- a/src/provider.c
+++ b/src/provider.c
@@ -134,6 +134,9 @@ static int connman_provider_save(struct connman_provider *provider)
g_key_file_set_string(keyfile, provider->identifier,
"VPN.Domain", provider->domain);
+ if (provider->driver != NULL && provider->driver->save != NULL)
+ provider->driver->save(provider, keyfile);
+
__connman_storage_save_provider(keyfile, provider->identifier);
g_key_file_free(keyfile);