summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2008-12-03 08:44:58 +0000
committerRichard Hughes <richard@hughsie.com>2008-12-03 08:44:58 +0000
commit04fb2a6e1396229a3f7d038c2edb75283c312be0 (patch)
treebb5d6d70cbd5e223460994ccbf87c6a5e26e317a /src
parent564dcb41c52e144d0f5a2ff6fd43c60d0d5c8a12 (diff)
bugfix: don't keep putting off the profile saving in DkpHistory
Diffstat (limited to 'src')
-rw-r--r--src/dkp-history.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/dkp-history.c b/src/dkp-history.c
index d5e39cf..234589b 100644
--- a/src/dkp-history.c
+++ b/src/dkp-history.c
@@ -444,6 +444,7 @@ static gboolean
dkp_history_schedule_save_cb (DkpHistory *history)
{
dkp_history_save_data (history);
+ history->priv->save_id = 0;
return FALSE;
}
@@ -486,7 +487,7 @@ dkp_history_schedule_save (DkpHistory *history)
{
gboolean ret;
- /* TODO: if low power, then don't batch up save requests */
+ /* if low power, then don't batch up save requests */
ret = dkp_history_is_low_power (history);
if (ret) {
egg_warning ("saving directly to disk as low power");
@@ -494,12 +495,9 @@ dkp_history_schedule_save (DkpHistory *history)
return TRUE;
}
- /* we already have one saved, cancel and reschedule */
+ /* we already have one saved */
if (history->priv->save_id != 0) {
egg_debug ("deferring as others queued");
- g_source_remove (history->priv->save_id);
- history->priv->save_id = g_timeout_add_seconds (DKP_HISTORY_SAVE_INTERVAL,
- (GSourceFunc) dkp_history_schedule_save_cb, history);
return TRUE;
}