You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
GConf2/gconf-timeouts.patch

108 lines
3.5 KiB

diff -up GConf-2.22.0/backends/markup-backend.c.timeouts GConf-2.22.0/backends/markup-backend.c
--- GConf-2.22.0/backends/markup-backend.c.timeouts 2007-06-25 07:11:19.000000000 -0400
+++ GConf-2.22.0/backends/markup-backend.c 2008-05-14 09:33:04.000000000 -0400
@@ -59,7 +59,6 @@ typedef struct
{
GConfSource source; /* inherit from GConfSource */
char *root_dir;
- guint timeout_id;
GConfLock* lock;
MarkupTree *tree;
guint dir_mode;
@@ -875,21 +874,6 @@ gconf_backend_get_vtable (void)
* MarkupSource
*/
-/* This timeout periodically unloads
- * data that hasn't been used in a while.
- */
-static gboolean
-cleanup_timeout (gpointer data)
-{
-#if 0
- MarkupSource* ms = (MarkupSource*)data;
-
- cache_clean(ms->cache, 60*5 /* 5 minutes */);
-#endif
-
- return TRUE;
-}
-
static MarkupSource*
ms_new (const char* root_dir,
guint dir_mode,
@@ -903,10 +887,6 @@ ms_new (const char* root_dir,
ms = g_new0(MarkupSource, 1);
- ms->timeout_id = g_timeout_add (1000*60*5, /* 1 sec * 60 s/min * 5 min */
- cleanup_timeout,
- ms);
-
ms->root_dir = g_strdup (root_dir);
ms->lock = lock;
@@ -941,11 +921,6 @@ ms_destroy (MarkupSource* ms)
error = NULL;
}
- if (!g_source_remove (ms->timeout_id))
- {
- /* should not happen, don't translate */
- gconf_log (GCL_ERR, "timeout not found to remove?");
- }
markup_tree_unref (ms->tree);
diff -up GConf-2.22.0/gconf/gconf-database.c.timeouts GConf-2.22.0/gconf/gconf-database.c
--- GConf-2.22.0/gconf/gconf-database.c.timeouts 2008-01-08 09:28:38.000000000 -0500
+++ GConf-2.22.0/gconf/gconf-database.c 2008-05-14 09:29:17.000000000 -0400
@@ -1008,7 +1008,7 @@ gconf_database_schedule_sync(GConfDataba
else
{
/* 1 minute timeout */
- db->sync_timeout = g_timeout_add(60000, (GSourceFunc)gconf_database_sync_timeout, db);
+ db->sync_timeout = g_timeout_add_seconds(60, (GSourceFunc)gconf_database_sync_timeout, db);
}
}
diff -up GConf-2.22.0/gconf/gconfd.c.timeouts GConf-2.22.0/gconf/gconfd.c
--- GConf-2.22.0/gconf/gconfd.c.timeouts 2008-05-14 09:29:17.000000000 -0400
+++ GConf-2.22.0/gconf/gconfd.c 2008-05-14 09:29:17.000000000 -0400
@@ -910,12 +910,12 @@ gconf_main(void)
if (main_loops == NULL)
{
- gulong timeout_len = 1000*60*0.5; /* 1 sec * 60 s/min * .5 min */
+ gulong timeout_len = 60*0.5; /* 60 s/min * .5 min */
g_assert(timeout_id == 0);
- timeout_id = g_timeout_add (timeout_len,
- periodic_cleanup_timeout,
- NULL);
+ timeout_id = g_timeout_add_seconds (timeout_len,
+ periodic_cleanup_timeout,
+ NULL);
}
@@ -1449,14 +1449,14 @@ open_append_handle (GError **err)
{
- const gulong timeout_len = 1000*60*0.5; /* 1 sec * 60 s/min * 0.5 min */
+ const gulong timeout_len = 60*0.5; /* 60 s/min * 0.5 min */
if (append_handle_timeout != 0)
g_source_remove (append_handle_timeout);
- append_handle_timeout = g_timeout_add (timeout_len,
- close_append_handle_timeout,
- NULL);
+ append_handle_timeout = g_timeout_add_seconds (timeout_len,
+ close_append_handle_timeout,
+ NULL);
}
}