Re: [evolution-patches] Fix for the bug #65167 [calendar]
- From: chenthill <pchenthill novell com>
- To: evolution-patches ximian com
- Subject: Re: [evolution-patches] Fix for the bug #65167 [calendar]
- Date: Wed, 08 Sep 2004 11:27:11 +0530
Hi,
Have attached the patch making the necessary changes.
thanks, chenthill.
On Tue, 2004-09-07 at 14:59 +0530, Harish Krishnaswamy wrote:
>- if (priv->cnc && priv->cache) {
>+ /* if cache has been sucessfully loaded return back
without loading again */
>+ if (priv->cache_load_state) {
I guess you are losing the priv->cnc check here..that would create
problems when the cache is still present and a wrong password is
supplied.
BTW, why dont we just unref the cache, should the cache population fail
for some reason - which is what I think you are trying to address by
using the load_state.
>- g_assert (default_zone != NULL);
You may perhaps need to replace the asserts (not remove them) by more
graceful checks.
regards,
harish
On Tue, 2004-09-07 at 11:12 +0530, chenthill wrote:
> Hi,
> Have attached a fix for the bug 65167. We should put the
> default_zone back into the cache since the task backend also needs
> the
> default zone.
>
> thanks, chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.329
diff -u -p -r1.329 ChangeLog
--- ChangeLog 7 Sep 2004 13:05:39 -0000 1.329
+++ ChangeLog 7 Sep 2004 13:56:18 -0000
@@ -1,4 +1,16 @@
2004-09-07 Chenthill Palanisamy <pchenthill novell com>
+
+ Fixes #65167
+ * backends/groupwise/e-cal-backend-groupwise.c
+ (connect_to_server): Reload the default zone into
+ the cache after clearing it.
+
+ * backends/groupwise/e-cal-backend-groupwise-utils.c
+ (set_categories_for_gw_item), e_gw_item_to_cal_component),
+ (set_properties_from_cal_component): replaced the assert
+ statements with If conditions.
+
+2004-09-07 Chenthill Palanisamy <pchenthill novell com>
Fixes #64685
* backends/groupwise/e-cal-backends-groupwise.c
Index: backends/groupwise/e-cal-backend-groupwise.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise.c,v
retrieving revision 1.93
diff -u -p -r1.93 e-cal-backend-groupwise.c
--- backends/groupwise/e-cal-backend-groupwise.c 7 Sep 2004 13:05:39 -0000 1.93
+++ backends/groupwise/e-cal-backend-groupwise.c 7 Sep 2004 13:56:19 -0000
@@ -339,13 +339,18 @@ connect_to_server (ECalBackendGroupwise
/* Clear the cache before populating it */
e_file_cache_clean (E_FILE_CACHE (priv->cache));
-
+
+ if (priv->default_zone)
+ e_cal_backend_cache_put_default_timezone (priv->cache, priv->default_zone);
+
/* Populate the cache for the first time.*/
/* start a timed polling thread set to 10 minutes*/
cnc_status = populate_cache (cbgw);
if (cnc_status != E_GW_CONNECTION_STATUS_OK) {
g_object_unref (priv->cnc);
+ g_object_unref (priv->cache);
priv->cnc = NULL;
+ priv->cache = NULL;
g_warning (G_STRLOC ": Could not populate the cache");
return GNOME_Evolution_Calendar_PermissionDenied;
} else {
Index: backends/groupwise/e-cal-backend-groupwise-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c,v
retrieving revision 1.32
diff -u -p -r1.32 e-cal-backend-groupwise-utils.c
--- backends/groupwise/e-cal-backend-groupwise-utils.c 7 Sep 2004 12:44:11 -0000 1.32
+++ backends/groupwise/e-cal-backend-groupwise-utils.c 7 Sep 2004 13:56:19 -0000
@@ -86,7 +86,7 @@ set_categories_for_gw_item (EGwItem *ite
categories_by_id = e_cal_backend_groupwise_get_categories_by_id (cbgw);
cnc = e_cal_backend_groupwise_get_connection (cbgw);
- g_assert (cnc != NULL || categories_by_name != NULL || categories_by_id != NULL);
+ g_return_if_fail (categories_by_id != NULL || categories_by_name != NULL || cnc != NULL);
for (; category_names != NULL; category_names = g_list_next (category_names)) {
if (!category_names->data || strlen(category_names->data) == 0 )
@@ -131,8 +131,8 @@ set_properties_from_cal_component (EGwIt
struct icaltimetype itt_utc;
default_zone = e_cal_backend_groupwise_get_default_zone (cbgw);
-
- g_assert (default_zone != NULL);
+
+ g_return_if_fail (default_zone != NULL);
/* first set specific properties */
switch (e_cal_component_get_vtype (comp)) {
@@ -395,7 +395,6 @@ e_gw_item_to_cal_component (EGwItem *ite
categories_by_id = e_cal_backend_groupwise_get_categories_by_id (cbgw);
g_return_val_if_fail (E_IS_GW_ITEM (item), NULL);
- g_assert (default_zone != NULL || categories_by_id != NULL);
comp = e_cal_component_new ();
@@ -462,7 +461,7 @@ e_gw_item_to_cal_component (EGwItem *ite
/* categories */
category_ids = e_gw_item_get_categories (item);
categories = NULL;
- if (category_ids) {
+ if (category_ids && categories_by_id) {
for (; category_ids != NULL; category_ids = g_list_next (category_ids)) {
name = g_hash_table_lookup (categories_by_id, category_ids->data);
if (name)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]