summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2011-04-08 17:44:01 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-04-11 12:02:43 +0200
commit328d8a4b0235434c8707e749004b260c419879b3 (patch)
treeeaf23b17becc6bbdee900b902130a89d07a8f1d3 /src/config.c
parent7cea7b2f67282b3df8aedc5e5ed0d91e61c271a6 (diff)
downloadconnman-328d8a4b0235434c8707e749004b260c419879b3.tar.gz
connman-328d8a4b0235434c8707e749004b260c419879b3.tar.bz2
connman-328d8a4b0235434c8707e749004b260c419879b3.zip
config: Avoid create_config forward declaration
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/config.c b/src/config.c
index 17ed7d14..22a47041 100644
--- a/src/config.c
+++ b/src/config.c
@@ -317,22 +317,6 @@ static int load_service(GKeyFile *keyfile, const char *group,
return 0;
}
-static struct connman_config *create_config(const char *ident);
-
-int __connman_config_load_service(GKeyFile *keyfile, const char *group)
-{
- struct connman_config *config = g_hash_table_lookup(config_table,
- NONFS_CONFIG_NAME);
-
- if (config == NULL) {
- config = create_config(NONFS_CONFIG_NAME);
- if (config == NULL)
- return -ENOMEM;
- }
-
- return load_service(keyfile, group, config);
-}
-
static int load_config(struct connman_config *config)
{
GKeyFile *keyfile;
@@ -401,6 +385,20 @@ static struct connman_config *create_config(const char *ident)
return config;
}
+int __connman_config_load_service(GKeyFile *keyfile, const char *group)
+{
+ struct connman_config *config = g_hash_table_lookup(config_table,
+ NONFS_CONFIG_NAME);
+
+ if (config == NULL) {
+ config = create_config(NONFS_CONFIG_NAME);
+ if (config == NULL)
+ return -ENOMEM;
+ }
+
+ return load_service(keyfile, group, config);
+}
+
static int read_configs(void)
{
GDir *dir;