Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 302868 Details for
Bug 442998
updates at login even when 'never'
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
test patch
gpk-respect-never.patch (text/plain), 2.88 KB, created by
Richard Hughes
on 2008-04-18 10:38:41 UTC
(
hide
)
Description:
test patch
Filename:
MIME Type:
Creator:
Richard Hughes
Created:
2008-04-18 10:38:41 UTC
Size:
2.88 KB
patch
obsolete
>diff --git a/src/gpk-auto-refresh.c b/src/gpk-auto-refresh.c >index 73e95c9..3667e64 100644 >--- a/src/gpk-auto-refresh.c >+++ b/src/gpk-auto-refresh.c >@@ -145,7 +145,8 @@ gpk_auto_refresh_signal_get_updates (GpkAutoRefresh *arefresh) > /** > * gpk_auto_refresh_convert_frequency: > * >- * Return value: The number of seconds for the frequency period >+ * Return value: The number of seconds for the frequency period, >+ * or zero for never or no schema > **/ > static guint > gpk_auto_refresh_convert_frequency (PkFreqEnum freq) >@@ -155,7 +156,7 @@ gpk_auto_refresh_convert_frequency (PkFreqEnum freq) > return 0; > } > if (freq == PK_FREQ_ENUM_NEVER) { >- return G_MAXUINT; >+ return 0; > } > if (freq == PK_FREQ_ENUM_HOURLY) { > return 60*60; >@@ -184,7 +185,7 @@ gpk_auto_refresh_convert_frequency_text (GpkAutoRefresh *arefresh, const gchar * > /* get from gconf */ > freq_text = gconf_client_get_string (arefresh->priv->gconf_client, key, NULL); > if (freq_text == NULL) { >- pk_warning ("no schema"); >+ pk_warning ("no schema for %s", key); > return 0; > } > >@@ -217,6 +218,13 @@ gpk_auto_refresh_maybe_refresh_cache (GpkAutoRefresh *arefresh) > return FALSE; > } > >+ /* get this each time, as it may have changed behind out back */ >+ thresh = gpk_auto_refresh_convert_frequency_text (arefresh, GPK_CONF_FREQUENCY_REFRESH_CACHE); >+ if (thresh == 0) { >+ pk_debug ("not when policy is to never refresh"); >+ return FALSE; >+ } >+ > /* get the time since the last refresh */ > ret = pk_control_get_time_since_action (arefresh->priv->control, > PK_ROLE_ENUM_REFRESH_CACHE, &time, NULL); >@@ -225,9 +233,6 @@ gpk_auto_refresh_maybe_refresh_cache (GpkAutoRefresh *arefresh) > return FALSE; > } > >- /* get this each time, as it may have changed behind out back */ >- thresh = gpk_auto_refresh_convert_frequency_text (arefresh, GPK_CONF_FREQUENCY_REFRESH_CACHE); >- > /* have we passed the timout? */ > if (time < thresh) { > pk_debug ("not before timeout, thresh=%u, now=%u", thresh, time); >@@ -250,6 +255,13 @@ gpk_auto_refresh_maybe_get_updates (GpkAutoRefresh *arefresh) > > g_return_val_if_fail (PK_IS_AUTO_REFRESH (arefresh), FALSE); > >+ /* get this each time, as it may have changed behind out back */ >+ thresh = gpk_auto_refresh_convert_frequency_text (arefresh, GPK_CONF_FREQUENCY_GET_UPDATES); >+ if (thresh == 0) { >+ pk_debug ("not when policy is to never refresh"); >+ return FALSE; >+ } >+ > /* get the time since the last refresh */ > ret = pk_control_get_time_since_action (arefresh->priv->control, > PK_ROLE_ENUM_GET_UPDATES, &time, NULL); >@@ -258,9 +270,6 @@ gpk_auto_refresh_maybe_get_updates (GpkAutoRefresh *arefresh) > return FALSE; > } > >- /* get this each time, as it may have changed behind out back */ >- thresh = gpk_auto_refresh_convert_frequency_text (arefresh, GPK_CONF_FREQUENCY_GET_UPDATES); >- > /* have we passed the timout? */ > if (time < thresh) { > pk_debug ("not before timeout, thresh=%u, now=%u", thresh, time);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 442998
: 302868