evolution-data-server r9880 - in trunk/calendar: . backends/groupwise



Author: msuman
Date: Wed Jan  7 04:04:27 2009
New Revision: 9880
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9880&view=rev

Log:
Part of fix for bug #443544 (bugzilla.novell.com) - Send a 'Free' block to the frontend if there are no 'Busy' blocks.

Modified:
   trunk/calendar/ChangeLog
   trunk/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c

Modified: trunk/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
==============================================================================
--- trunk/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c	(original)
+++ trunk/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c	Wed Jan  7 04:04:27 2009
@@ -1829,7 +1829,24 @@
 			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")) {
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]