From: Suman Manjunath Date: Wed, 7 Jan 2009 04:04:27 +0000 (+0000) Subject: Part of fix for bug #443544 (bugzilla.novell.com) - Send a 'Free' block to the fronte... X-Git-Tag: upstream/3.7.4~4350 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17185691c2ce3d9748f675028f0c8e37fe2dbe11;p=platform%2Fupstream%2Fevolution-data-server.git Part of fix for bug #443544 (bugzilla.novell.com) - Send a 'Free' block to the frontend if there are no 'Busy' blocks. svn path=/trunk/; revision=9880 --- diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 6a614d4..a939407 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +2009-01-07 Suman Manjunath + + ** Fix for bug #443544 (bugzilla.novell.com) + + * backends/groupwise/e-cal-backend-groupwise-utils.c + (e_gw_connection_get_freebusy_info): Send a 'Free' block to the + frontend if there are no 'Busy' blocks. + 2009-01-05 Lubomir Rintel ** Fix for bug #566627 diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c index 806f59a..591b679 100644 --- a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c +++ b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c @@ -1829,7 +1829,24 @@ e_gw_connection_get_freebusy_info (EGwConnection *cnc, GList *users, time_t star return E_GW_CONNECTION_STATUS_INVALID_RESPONSE; } - for (subparam_block = soup_soap_parameter_get_first_child_by_name (param_blocks, "block"); + subparam_block = soup_soap_parameter_get_first_child_by_name (param_blocks, "block"); + /* The GW server only returns 'Busy', 'OOF' and 'Tentative' periods. The rest are + * assumed to be 'Free' periods. In case of an attendee having only 'Free' periods, + * ensure to send a block to the frontend saying so. */ + if (subparam_block == NULL) { + struct icalperiodtype ipt; + icaltimetype sitt, eitt; + icalproperty *icalprop; + sitt = icaltime_from_timet_with_zone (start, 0, default_zone ? default_zone : NULL); + ipt.start = sitt; + eitt = icaltime_from_timet_with_zone (end, 0, default_zone ? default_zone : NULL); + ipt.end = eitt; + icalprop = icalproperty_new_freebusy (ipt); + icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "FREE"); + icalcomponent_add_property(icalcomp, icalprop); + } + + for (; subparam_block != NULL; subparam_block = soup_soap_parameter_get_next_child_by_name (subparam_block, "block")) {