summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-02-18 17:23:36 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-02-19 12:23:10 +0200
commit72c6c267396f5346aaae3092d34db3276eef1827 (patch)
tree78912910265b22fb31001bebcc1820e6ae26ce07 /src
parenta52dff44832c95eb86f3bd61118ae8bb023794ae (diff)
downloadconnman-72c6c267396f5346aaae3092d34db3276eef1827.tar.gz
connman-72c6c267396f5346aaae3092d34db3276eef1827.tar.bz2
connman-72c6c267396f5346aaae3092d34db3276eef1827.zip
storage: Add function to load provider configuration file
Diffstat (limited to 'src')
-rw-r--r--src/connman.h1
-rw-r--r--src/storage.c16
2 files changed, 17 insertions, 0 deletions
diff --git a/src/connman.h b/src/connman.h
index 484d1e02..9861c7f5 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -206,6 +206,7 @@ int __connman_storage_save_global(GKeyFile *keyfile);
void __connman_storage_delete_global(void);
GKeyFile *__connman_storage_load_config(const char *ident);
+GKeyFile *__connman_storage_load_provider_config(const char *ident);
GKeyFile *__connman_storage_open_service(const char *ident);
int __connman_storage_save_service(GKeyFile *keyfile, const char *ident);
diff --git a/src/storage.c b/src/storage.c
index 47822dae..1ceafb99 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -147,6 +147,22 @@ GKeyFile *__connman_storage_load_config(const char *ident)
return keyfile;
}
+GKeyFile *__connman_storage_load_provider_config(const char *ident)
+{
+ gchar *pathname;
+ GKeyFile *keyfile = NULL;
+
+ pathname = g_strdup_printf("%s/%s.config", VPN_STORAGEDIR, ident);
+ if (pathname == NULL)
+ return NULL;
+
+ keyfile = storage_load(pathname);
+
+ g_free(pathname);
+
+ return keyfile;
+}
+
GKeyFile *__connman_storage_open_service(const char *service_id)
{
gchar *pathname;