From ecc9daca9a8a7d480bc5ad31732b280b1e564c2f Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Mon, 28 May 2012 10:04:50 +0300 Subject: [PATCH] config: Remove unused function --- src/config.c | 56 -------------------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/src/config.c b/src/config.c index 66e1316..ba46366 100644 --- a/src/config.c +++ b/src/config.c @@ -461,62 +461,6 @@ static struct connman_config *create_config(const char *ident) return config; } -int __connman_config_load_service(GKeyFile *keyfile, const char *group, - connman_bool_t persistent) -{ - struct connman_config *config; - const char *service_name; - char *ident, *content = NULL; - gsize content_length; - int err; - - service_name = group + strlen("service_"); - ident = g_strdup_printf("%s_%s", INTERNAL_CONFIG_PREFIX, service_name); - if (ident == NULL) - return -ENOMEM; - - DBG("ident %s", ident); - - config = g_hash_table_lookup(config_table, ident); - if (config == NULL) { - config = create_config(ident); - if (config == NULL) { - err = -ENOMEM; - goto out; - } - - config->protected = FALSE; - } - - err = load_service(keyfile, group, config); - if (persistent == FALSE || err < 0) - goto out; - - g_key_file_set_string(keyfile, "global", CONFIG_KEY_NAME, - service_name); - g_key_file_set_string(keyfile, "global", CONFIG_KEY_DESC, - "Internal Config File"); - g_key_file_set_boolean(keyfile, "global", CONFIG_KEY_PROT, FALSE); - - content = g_key_file_to_data(keyfile, &content_length, NULL); - if (content == NULL) { - err = -EIO; - goto out; - } - - DBG("Saving %zu bytes to %s", content_length, service_name); - - __connman_storage_save_config(keyfile, ident); - - return 0; - -out: - g_free(ident); - g_free(content); - - return err; -} - static connman_bool_t validate_ident(const char *ident) { unsigned int i; -- 2.7.4