From a38ccf3a809e31234a3a8001e6cc73253a18e76a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 14 Jul 2010 02:59:12 +0200 Subject: [PATCH] Set has_data to true after the data is loaded to prevent excessive reloading of config files. --- src/polkitbackend/polkitbackendconfigsource.c | 1 + .../polkitbackendlocalauthorizationstore.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/polkitbackend/polkitbackendconfigsource.c b/src/polkitbackend/polkitbackendconfigsource.c index 224d0d0..465da96 100644 --- a/src/polkitbackend/polkitbackendconfigsource.c +++ b/src/polkitbackend/polkitbackendconfigsource.c @@ -386,6 +386,7 @@ polkit_backend_config_source_ensure (PolkitBackendConfigSource *source) } source->priv->key_files = g_list_reverse (source->priv->key_files); + source->priv->has_data = TRUE; out: g_list_foreach (files, (GFunc) g_object_unref, NULL); diff --git a/src/polkitbackend/polkitbackendlocalauthorizationstore.c b/src/polkitbackend/polkitbackendlocalauthorizationstore.c index 5d5dc14..c1d6dfe 100644 --- a/src/polkitbackend/polkitbackendlocalauthorizationstore.c +++ b/src/polkitbackend/polkitbackendlocalauthorizationstore.c @@ -636,6 +636,7 @@ polkit_backend_local_authorization_store_ensure (PolkitBackendLocalAuthorization store->priv->authorizations = g_list_reverse (store->priv->authorizations); g_key_file_free (key_file); + store->priv->has_data = TRUE; } g_free (filename); -- 1.7.1.1