[evolution-patches] Fixes for #57218 and #54280
- From: Harish Krishnaswamy <kharish novell com>
- To: patches <evolution-patches lists ximian com>
- Subject: [evolution-patches] Fixes for #57218 and #54280
- Date: Mon, 24 May 2004 20:18:24 +0530
hi,
The following patch contains the fix for #54280 and the Groupwise part
of #57218 . The code for detecting changes in accept_level has been
modified to use the SET_DELTA macro for uniformity with the rest of the
fields.
harish
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.273
diff -u -p -r1.273 ChangeLog
--- calendar/ChangeLog 21 May 2004 13:18:55 -0000 1.273
+++ calendar/ChangeLog 24 May 2004 14:40:37 -0000
@@ -1,3 +1,18 @@
+2004-05-24 Harish Krishnaswamy <kharish novell com>
+
+ Fixes GW portion of #57218 and #54280
+
+ * backends/groupwise/e-cal-backend-groupwise-utils.c:
+ (start_freebusy_session): removed FIXME comments (the code had been
+ fixed much earlier).
+ (e_gw_item_set_changes):use the SET_DELTA macro to get accept_level
+ changes.
+ * backends/groupwise/e-cal-backend-groupwise.c:
+ (e_cal_backend_groupwise_modify_object),
+ (e_cal_backend_groupwise_remove_object),
+ (e_cal_backend_groupwise_send_objects): set return arguments
correctly.
+ and removed dead code in remove_object.
+
2004-05-21 JP Rosevear <jpr novell com>
* backends/file/e-cal-backend-file.c
Index: calendar/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.68
diff -u -p -r1.68 e-cal-backend-groupwise.c
--- calendar/backends/groupwise/e-cal-backend-groupwise.c 18 May 2004
17:16:54 -0000 1.68
+++ calendar/backends/groupwise/e-cal-backend-groupwise.c 24 May 2004
14:40:37 -0000
@@ -1001,6 +1001,7 @@ e_cal_backend_groupwise_modify_object (E
EGwConnectionStatus status;
EGwItem *item, *cache_item;
+ *old_object = NULL;
cbgw = E_CAL_BACKEND_GROUPWISE (backend);
priv = cbgw->priv;
@@ -1049,6 +1050,7 @@ e_cal_backend_groupwise_modify_object (E
g_object_unref (comp);
+ *old_object = g_strdup (calobj);
return GNOME_Evolution_Calendar_Success;
}
@@ -1060,6 +1062,7 @@ e_cal_backend_groupwise_remove_object (E
{
ECalBackendGroupwise *cbgw;
ECalBackendGroupwisePrivate *priv;
+ char *calobj = NULL;
cbgw = E_CAL_BACKEND_GROUPWISE (backend);
priv = cbgw->priv;
@@ -1067,7 +1070,7 @@ e_cal_backend_groupwise_remove_object (E
/* if online, remove the item from the server */
if (priv->mode == CAL_MODE_REMOTE) {
ECalBackendSyncStatus status;
- char *calobj, *id_to_remove = NULL;
+ char *id_to_remove = NULL;
icalproperty *icalprop;
icalcomponent *icalcomp;
@@ -1076,9 +1079,10 @@ e_cal_backend_groupwise_remove_object (E
return status;
icalcomp = icalparser_parse_string (calobj);
- g_free (calobj);
- if (!icalcomp)
+ if (!icalcomp) {
+ g_free (calobj);
return GNOME_Evolution_Calendar_InvalidObject;
+ }
/* search the component for the X-EVOLUTION-GROUPWISE-ID property */
icalprop = icalcomponent_get_first_property (icalcomp,
ICAL_X_PROPERTY);
@@ -1106,20 +1110,30 @@ e_cal_backend_groupwise_remove_object (E
icalcomponent_free (icalcomp);
if (status == E_GW_CONNECTION_STATUS_OK) {
/* remove the component from the cache */
- if (!e_cal_backend_cache_remove_component (priv->cache, uid, rid))
+ if (!e_cal_backend_cache_remove_component (priv->cache, uid, rid)) {
+ g_free (calobj);
return GNOME_Evolution_Calendar_ObjectNotFound;
+ }
+ *object = g_strdup (calobj);
+ g_free (calobj);
return GNOME_Evolution_Calendar_Success;
- } else
+ } else {
+ g_free (calobj);
return GNOME_Evolution_Calendar_OtherError;
+ }
+ // FIXME this is dead code
/* if there was no X-EVOLUTION-GROUPWISE-ID property, return
NOT_FOUND */
return GNOME_Evolution_Calendar_ObjectNotFound;
}
/* remove the component from the cache */
- if (!e_cal_backend_cache_remove_component (priv->cache, uid, rid))
+ if (!e_cal_backend_cache_remove_component (priv->cache, uid, rid)) {
+ g_free (calobj);
return GNOME_Evolution_Calendar_ObjectNotFound;
+ }
+ *object = g_strdup (calobj);
return GNOME_Evolution_Calendar_Success;
}
@@ -1257,7 +1271,19 @@ e_cal_backend_groupwise_send_objects (EC
status = send_object (cbgw, cal, icalcomp);
} else
status = GNOME_Evolution_Calendar_InvalidObject;
-
+
+ if (status == GNOME_Evolution_Calendar_Success) {
+ ECalComponent *comp;
+
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomp);
+
+ if (comp) {
+ e_cal_component_get_attendee_list (comp, users);
+ g_object_unref (comp);
+ }
+ *modified_calobj = g_strdup (calobj);
+ }
icalcomponent_free (icalcomp);
return status;
Index: calendar/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.18
diff -u -p -r1.18 e-cal-backend-groupwise-utils.c
--- calendar/backends/groupwise/e-cal-backend-groupwise-utils.c 18 May
2004 17:16:54 -0000 1.18
+++ calendar/backends/groupwise/e-cal-backend-groupwise-utils.c 24 May
2004 14:40:37 -0000
@@ -525,10 +525,6 @@ start_freebusy_session (EGwConnection *c
soup_soap_message_end_element (msg);
- /*FIXME check if this needs to be formatted into GW form with
separators*/
- /*FIXME the following code converts time_t to String
representation
- * through icaltime. Find if a direct conversion exists. */
- /* Timezone in server is assumed to be UTC */
utc = icaltimezone_get_utc_timezone ();
icaltime = icaltime_from_timet_with_zone (start, FALSE, utc);
@@ -793,17 +789,7 @@ e_gw_item_set_changes (EGwItem *item, EG
if (strcmp (e_gw_item_get_end_date (item), e_gw_item_get_end_date
(cache_item)))
e_gw_item_set_change (item, E_GW_ITEM_CHANGE_TYPE_UPDATE, "endDate",
e_gw_item_get_end_date (item));
- accept_level = e_gw_item_get_accept_level
(item);
- cache_accept_level = e_gw_item_get_accept_level
(cache_item);
- if ( cache_accept_level )
{
- if (!accept_level
)
- e_gw_item_set_change (item, E_GW_ITEM_CHANGE_TYPE_DELETE,
"acceptLevel", cache_accept_level );
- else if (strcmp ( accept_level, cache_accept_level
))
- e_gw_item_set_change (item, E_GW_ITEM_CHANGE_TYPE_UPDATE,
"acceptLevel", accept_level );
- }
- else if ( accept_level
)
- e_gw_item_set_change (item, E_GW_ITEM_CHANGE_TYPE_ADD,
"acceptLevel", accept_level );
-
+ SET_DELTA(accept_level);
SET_DELTA(place);
trigger = e_gw_item_get_trigger (item);
cache_trigger = e_gw_item_get_trigger (cache_item);
Index: servers/groupwise/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/ChangeLog,v
retrieving revision 1.45
diff -u -p -r1.45 ChangeLog
--- servers/groupwise/ChangeLog 18 May 2004 17:16:54 -0000 1.45
+++ servers/groupwise/ChangeLog 24 May 2004 14:40:37 -0000
@@ -1,3 +1,10 @@
+2004-05-24 Harish Krishnaswamy <kharish novell com>
+
+
+ * e-gw-item.c: (append_event_changes_to_soap_message):
+ use accept_level instead of AcceptLevel as the hash key
+ as the SET_DELTA macro is being used to set the changes.
+
2004-05-18 Harish Krishnaswamy <kharish novell com>
Fixes #56320 and related timezone issues.
Index: servers/groupwise/e-gw-item.c
===================================================================
RCS file:
/cvs/gnome/evolution-data-server/servers/groupwise/e-gw-item.c,v
retrieving revision 1.32
diff -u -p -r1.32 e-gw-item.c
--- servers/groupwise/e-gw-item.c 18 May 2004 17:16:54 -0000 1.32
+++ servers/groupwise/e-gw-item.c 24 May 2004 14:40:38 -0000
@@ -1894,7 +1894,7 @@ append_event_changes_to_soap_message (EG
if (g_hash_table_lookup (changes, "classification"))
e_gw_message_write_string_parameter (msg, "class", NULL,
priv->classification);
- if (g_hash_table_lookup (changes, "acceptLevel"))
+ if (g_hash_table_lookup (changes, "accept_level"))
e_gw_message_write_string_parameter (msg, "acceptLevel", NULL,
priv->accept_level ? priv->accept_level : "");
if (g_hash_table_lookup (changes, "place"))
e_gw_message_write_string_parameter (msg, "place", NULL, priv->place
? priv->place : "");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]