diff options
author | Veerapuram Varadhan <vvaradhan@novell.com> | 2011-10-14 18:32:10 +0800 |
---|---|---|
committer | Punit Jain <jpunit@novell.com> | 2011-10-14 18:32:10 +0800 |
commit | 4378af9ac6b6d2e5e345e4bb10dc1486f8cef44a (patch) | |
tree | 0a23999668a567afb3e9469b53724c74f4f024f0 /calendar/gui | |
parent | 6de4d33e3fa02adc5f846b32712889b9d40f9172 (diff) | |
download | gsoc2013-evolution-4378af9ac6b6d2e5e345e4bb10dc1486f8cef44a.tar gsoc2013-evolution-4378af9ac6b6d2e5e345e4bb10dc1486f8cef44a.tar.gz gsoc2013-evolution-4378af9ac6b6d2e5e345e4bb10dc1486f8cef44a.tar.bz2 gsoc2013-evolution-4378af9ac6b6d2e5e345e4bb10dc1486f8cef44a.tar.lz gsoc2013-evolution-4378af9ac6b6d2e5e345e4bb10dc1486f8cef44a.tar.xz gsoc2013-evolution-4378af9ac6b6d2e5e345e4bb10dc1486f8cef44a.tar.zst gsoc2013-evolution-4378af9ac6b6d2e5e345e4bb10dc1486f8cef44a.zip |
Downstream bug Bnc#688711 unable to book resource
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/itip-utils.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index c2fa19ba68..187757cece 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -39,6 +39,8 @@ #include <composer/e-msg-composer.h> +#define d(x) + static const gchar *itip_methods[] = { "PUBLISH", "REQUEST", @@ -574,8 +576,15 @@ comp_to_list (ECalComponentItipMethod method, for (l = attendees; l != NULL; l = l->next) { ECalComponentAttendee *att = l->data; + /* Bugfix: 688711 - Varadhan + Resource is also considered as a "attendee". If the respective backend + is able to successfully book resources automagically, it will appear + in the users list and thereby won't get added to the list of destinations + to send the meeting invite, otherwise, as a safety measure, a meeting + invite will be sent to the resources as well. */ if (att->cutype != ICAL_CUTYPE_INDIVIDUAL && - att->cutype != ICAL_CUTYPE_GROUP) + att->cutype != ICAL_CUTYPE_GROUP && + att->cutype != ICAL_CUTYPE_RESOURCE) continue; else if (users_has_attendee (users, att->value)) continue; @@ -606,6 +615,9 @@ comp_to_list (ECalComponentItipMethod method, e_destination_set_email ( destination, itip_strip_mailto (att->value)); g_ptr_array_add (array, destination); + d(printf ("itip-utils.c: comp_to_list: name: %s, email: %s\n", + e_destination_get_name (destination), + e_destination_get_email (destination))); } g_free (sender); e_cal_component_free_attendee_list (attendees); @@ -961,8 +973,10 @@ comp_server_send (ECalComponentItipMethod method, GError *error = NULL; top_level = comp_toplevel_with_zones (method, comp, cal_client, zones); + d(printf ("itip-utils.c: comp_server_send: calling e_cal_send_objects... \n")); if (!e_cal_client_send_objects_sync (cal_client, top_level, users, &returned_icalcomp, NULL, &error)) { /* FIXME Really need a book problem status code */ + d(printf ("itip-utils.c: return value from e_cal_send_objects is: %d", error->code)); if (error) { if (g_error_matches (error, E_CAL_CLIENT_ERROR, E_CAL_CLIENT_ERROR_OBJECT_ID_ALREADY_EXISTS)) { e_notice ( @@ -979,6 +993,8 @@ comp_server_send (ECalComponentItipMethod method, retval = FALSE; } + } else { + d(printf ("itip-utils.c: e_cal_send_objects returned without errors\n")); } g_clear_error (&error); @@ -1505,6 +1521,7 @@ itip_send_comp (ECalComponentItipMethod method, /* Give the server a chance to manipulate the comp */ if (method != E_CAL_COMPONENT_METHOD_PUBLISH) { + d(printf ("itip-utils.c: itip_send_comp: calling comp_server_send... \n")); if (!comp_server_send (method, send_comp, cal_client, zones, &users)) goto cleanup; } |