summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-08-04 16:42:14 +0000
committerChenthill Palanisamy <pchen@src.gnome.org>2005-08-04 16:42:14 +0000
commit9087c02991fceab59982ae30e4f5c89890a71dc8 (patch)
treee3abf580a351414eff641b3eb5517e60be63d565
parent1d72516277c1145a262e98fe424f6a9058d84be0 (diff)
downloadevolution-data-server-9087c02991fceab59982ae30e4f5c89890a71dc8.tar.gz
Fixes #305590
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/backends/groupwise/e-cal-backend-groupwise-utils.c47
2 files changed, 30 insertions, 24 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index a560d61b9..26106ecda 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2005-08-04 Chenthill Palanisamy <pchenthill@novell.com>
+
+ Fixes #305590
+ * backends/groupwise/e-cal-backend-groupwise-utils.c:
+ (e_gw_connection_get_freebusy_info): Get the FreeBusyStatus
+ element from the response before getting the FreeBusyInfo.
+
2005-08-02 Chenthill Palanisamy <pchenthill@novell.com>
Fixes #310328
diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
index 418f115f5..a04be96f9 100644
--- a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
+++ b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
@@ -1478,14 +1478,14 @@ e_gw_connection_get_freebusy_info (EGwConnection *cnc, GList *users, time_t star
SoupSoapMessage *msg;
SoupSoapResponse *response;
EGwConnectionStatus status;
- SoupSoapParameter *param, *subparam;
- const char *session;
+ SoupSoapParameter *param, *subparam, *param_outstanding;
+ const char *session, *outstanding = NULL;
gboolean resend_request = TRUE;
int request_iteration = 0;
g_return_val_if_fail (E_IS_GW_CONNECTION (cnc), E_GW_CONNECTION_STATUS_INVALID_CONNECTION);
- /* Perform startFreeBusySession */
+ /* Perform startFreeBusySession */
status = start_freebusy_session (cnc, users, start, end, &session);
/*FIXME log error messages */
if (status != E_GW_CONNECTION_STATUS_OK)
@@ -1516,35 +1516,34 @@ e_gw_connection_get_freebusy_info (EGwConnection *cnc, GList *users, time_t star
return status;
}
- /* FIXME the FreeBusyStats are not used currently. */
- param = soup_soap_response_get_first_parameter_by_name (response, "freeBusyInfo");
+ param = soup_soap_response_get_first_parameter_by_name (response, "freeBusyStats");
if (!param) {
g_object_unref (response);
g_object_unref (msg);
return E_GW_CONNECTION_STATUS_INVALID_RESPONSE;
}
- for (subparam = soup_soap_parameter_get_first_child_by_name (param, "freeBusyStats");
- subparam != NULL;
- subparam = soup_soap_parameter_get_next_child_by_name (subparam, "freeBusyStats")) {
- SoupSoapParameter *param_outstanding;
- const char *outstanding = NULL;
-
- param_outstanding = soup_soap_parameter_get_first_child_by_name (subparam, "outstanding");
- if (param_outstanding)
- outstanding = soup_soap_parameter_get_string_value (param_outstanding);
- /* Try 12 times - this is approximately 2 minutes of time to
- * obtain the free/busy information from the server */
- if (outstanding && strcmp (outstanding, "0") && (request_iteration < 12)) {
- request_iteration++;
- g_object_unref (msg);
- g_object_unref (response);
- g_usleep (10000000);
- goto resend;
- }
-
+ param_outstanding = soup_soap_parameter_get_first_child_by_name (param, "outstanding");
+ if (param_outstanding)
+ outstanding = soup_soap_parameter_get_string_value (param_outstanding);
+ /* Try 12 times - this is approximately 2 minutes of time to
+ * obtain the free/busy information from the server */
+ if (outstanding && strcmp (outstanding, "0") && (request_iteration < 12)) {
+ request_iteration++;
+ g_object_unref (msg);
+ g_object_unref (response);
+ g_usleep (10000000);
+ goto resend;
}
+ /* FIXME the FreeBusyStats are not used currently. */
+ param = soup_soap_response_get_first_parameter_by_name (response, "freeBusyInfo");
+ if (!param) {
+ g_object_unref (response);
+ g_object_unref (msg);
+ return E_GW_CONNECTION_STATUS_INVALID_RESPONSE;
+ }
+
resend_request = FALSE;
for (subparam = soup_soap_parameter_get_first_child_by_name (param, "user");