[grilo] net: Avoid creating multiple caches
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] net: Avoid creating multiple caches
- Date: Tue, 8 Apr 2014 13:19:56 +0000 (UTC)
commit 2c5e804d8392d3f5e4458570b4229e8c50293ba2
Author: Bastien Nocera <hadess hadess net>
Date: Fri Mar 28 18:07:03 2014 +0100
net: Avoid creating multiple caches
Call grl_net_wc_set_cache(wc, TRUE) 4 times, your SoupSession
will end up with 4 caches. Not what we want.
https://bugzilla.gnome.org/show_bug.cgi?id=724907
libs/net/grl-net-wc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libs/net/grl-net-wc.c b/libs/net/grl-net-wc.c
index e840cc2..bb49590 100644
--- a/libs/net/grl-net-wc.c
+++ b/libs/net/grl-net-wc.c
@@ -1079,9 +1079,9 @@ grl_net_wc_set_cache (GrlNetWc *self,
{
g_return_if_fail (GRL_IS_NET_WC (self));
- if (use_cache)
+ if (use_cache && !cache_is_available (self))
cache_up (self);
- else
+ else if (!use_cache && cache_is_available (self))
cache_down (self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]