|
|
ddbc0f |
diff -up evolution-ews-3.8.5/src/calendar/e-cal-backend-ews.c.get-attachments-prototype-fix evolution-ews-3.8.5/src/calendar/e-cal-backend-ews.c
|
|
|
ddbc0f |
--- evolution-ews-3.8.5/src/calendar/e-cal-backend-ews.c.get-attachments-prototype-fix 2013-08-11 13:42:31.000000000 +0200
|
|
|
ddbc0f |
+++ evolution-ews-3.8.5/src/calendar/e-cal-backend-ews.c 2013-09-10 15:36:31.910691543 +0200
|
|
|
ddbc0f |
@@ -3164,6 +3164,7 @@ ews_get_attachments (ECalBackendEws *cbe
|
|
|
ddbc0f |
ECalComponent *comp;
|
|
|
ddbc0f |
const gchar *uid;
|
|
|
ddbc0f |
GSList *uris = NULL, *info_attachments = NULL;
|
|
|
ddbc0f |
+ GError *local_error = NULL;
|
|
|
ddbc0f |
|
|
|
ddbc0f |
e_ews_item_has_attachments (item, &has_attachment);
|
|
|
ddbc0f |
if (!has_attachment)
|
|
|
ddbc0f |
@@ -3193,7 +3194,7 @@ ews_get_attachments (ECalBackendEws *cbe
|
|
|
ddbc0f |
&info_attachments,
|
|
|
ddbc0f |
NULL, NULL,
|
|
|
ddbc0f |
cbews->priv->cancellable,
|
|
|
ddbc0f |
- NULL)) {
|
|
|
ddbc0f |
+ &local_error)) {
|
|
|
ddbc0f |
icalcomponent *icalcomp;
|
|
|
ddbc0f |
icalproperty *icalprop;
|
|
|
ddbc0f |
icalparameter *icalparam;
|
|
|
ddbc0f |
@@ -3233,7 +3234,10 @@ ews_get_attachments (ECalBackendEws *cbe
|
|
|
ddbc0f |
|
|
|
ddbc0f |
g_slist_free_full (uris, g_free);
|
|
|
ddbc0f |
g_slist_free_full (info_attachments, (GDestroyNotify) e_ews_attachment_info_free);
|
|
|
ddbc0f |
+ } else {
|
|
|
ddbc0f |
+ g_warning ("%s: Failed to get attachments: %s", G_STRFUNC, local_error ? local_error->message : "Unknown error");
|
|
|
ddbc0f |
}
|
|
|
ddbc0f |
+ g_clear_error (&local_error);
|
|
|
ddbc0f |
|
|
|
ddbc0f |
PRIV_UNLOCK (cbews->priv);
|
|
|
ddbc0f |
}
|
|
|
ddbc0f |
diff -up evolution-ews-3.8.5/src/server/e-ews-connection.c.get-attachments-prototype-fix evolution-ews-3.8.5/src/server/e-ews-connection.c
|
|
|
ddbc0f |
--- evolution-ews-3.8.5/src/server/e-ews-connection.c.get-attachments-prototype-fix 2013-08-11 13:42:31.000000000 +0200
|
|
|
ddbc0f |
+++ evolution-ews-3.8.5/src/server/e-ews-connection.c 2013-09-10 15:36:31.911691543 +0200
|
|
|
ddbc0f |
@@ -6202,7 +6202,7 @@ e_ews_connection_get_attachments (EEwsCo
|
|
|
ddbc0f |
g_object_unref (simple);
|
|
|
ddbc0f |
}
|
|
|
ddbc0f |
|
|
|
ddbc0f |
-GSList *
|
|
|
ddbc0f |
+gboolean
|
|
|
ddbc0f |
e_ews_connection_get_attachments_finish (EEwsConnection *cnc,
|
|
|
ddbc0f |
GAsyncResult *result,
|
|
|
ddbc0f |
GSList **items,
|
|
|
ddbc0f |
@@ -6211,24 +6211,24 @@ e_ews_connection_get_attachments_finish
|
|
|
ddbc0f |
GSimpleAsyncResult *simple;
|
|
|
ddbc0f |
EwsAsyncData *async_data;
|
|
|
ddbc0f |
|
|
|
ddbc0f |
- g_return_val_if_fail (cnc != NULL, NULL);
|
|
|
ddbc0f |
+ g_return_val_if_fail (cnc != NULL, FALSE);
|
|
|
ddbc0f |
g_return_val_if_fail (
|
|
|
ddbc0f |
g_simple_async_result_is_valid (
|
|
|
ddbc0f |
result, G_OBJECT (cnc), e_ews_connection_get_attachments),
|
|
|
ddbc0f |
- NULL);
|
|
|
ddbc0f |
+ FALSE);
|
|
|
ddbc0f |
|
|
|
ddbc0f |
simple = G_SIMPLE_ASYNC_RESULT (result);
|
|
|
ddbc0f |
async_data = g_simple_async_result_get_op_res_gpointer (simple);
|
|
|
ddbc0f |
|
|
|
ddbc0f |
if (g_simple_async_result_propagate_error (simple, error))
|
|
|
ddbc0f |
- return NULL;
|
|
|
ddbc0f |
+ return FALSE;
|
|
|
ddbc0f |
|
|
|
ddbc0f |
*items = async_data->items;
|
|
|
ddbc0f |
|
|
|
ddbc0f |
- return async_data->items_created;
|
|
|
ddbc0f |
+ return TRUE;
|
|
|
ddbc0f |
}
|
|
|
ddbc0f |
|
|
|
ddbc0f |
-GSList *
|
|
|
ddbc0f |
+gboolean
|
|
|
ddbc0f |
e_ews_connection_get_attachments_sync (EEwsConnection *cnc,
|
|
|
ddbc0f |
gint pri,
|
|
|
ddbc0f |
const gchar *uid,
|
|
|
ddbc0f |
@@ -6243,9 +6243,9 @@ e_ews_connection_get_attachments_sync (E
|
|
|
ddbc0f |
{
|
|
|
ddbc0f |
EAsyncClosure *closure;
|
|
|
ddbc0f |
GAsyncResult *result;
|
|
|
ddbc0f |
- GSList *attachments_ids;
|
|
|
ddbc0f |
+ gboolean success;
|
|
|
ddbc0f |
|
|
|
ddbc0f |
- g_return_val_if_fail (cnc != NULL, NULL);
|
|
|
ddbc0f |
+ g_return_val_if_fail (cnc != NULL, FALSE);
|
|
|
ddbc0f |
|
|
|
ddbc0f |
closure = e_async_closure_new ();
|
|
|
ddbc0f |
|
|
|
ddbc0f |
@@ -6256,12 +6256,12 @@ e_ews_connection_get_attachments_sync (E
|
|
|
ddbc0f |
|
|
|
ddbc0f |
result = e_async_closure_wait (closure);
|
|
|
ddbc0f |
|
|
|
ddbc0f |
- attachments_ids = e_ews_connection_get_attachments_finish (
|
|
|
ddbc0f |
+ success = e_ews_connection_get_attachments_finish (
|
|
|
ddbc0f |
cnc, result, items, error);
|
|
|
ddbc0f |
|
|
|
ddbc0f |
e_async_closure_free (closure);
|
|
|
ddbc0f |
|
|
|
ddbc0f |
- return attachments_ids;
|
|
|
ddbc0f |
+ return success;
|
|
|
ddbc0f |
}
|
|
|
ddbc0f |
|
|
|
ddbc0f |
static void
|
|
|
ddbc0f |
diff -up evolution-ews-3.8.5/src/server/e-ews-connection.h.get-attachments-prototype-fix evolution-ews-3.8.5/src/server/e-ews-connection.h
|
|
|
ddbc0f |
--- evolution-ews-3.8.5/src/server/e-ews-connection.h.get-attachments-prototype-fix 2013-08-11 13:42:31.000000000 +0200
|
|
|
ddbc0f |
+++ evolution-ews-3.8.5/src/server/e-ews-connection.h 2013-09-10 15:36:31.912691543 +0200
|
|
|
ddbc0f |
@@ -723,12 +723,12 @@ void e_ews_connection_get_attachments
|
|
|
ddbc0f |
GCancellable *cancellable,
|
|
|
ddbc0f |
GAsyncReadyCallback callback,
|
|
|
ddbc0f |
gpointer user_data);
|
|
|
ddbc0f |
-GSList * e_ews_connection_get_attachments_finish
|
|
|
ddbc0f |
+gboolean e_ews_connection_get_attachments_finish
|
|
|
ddbc0f |
(EEwsConnection *cnc,
|
|
|
ddbc0f |
GAsyncResult *result,
|
|
|
ddbc0f |
GSList **items,
|
|
|
ddbc0f |
GError **error);
|
|
|
ddbc0f |
-GSList * e_ews_connection_get_attachments_sync
|
|
|
ddbc0f |
+gboolean e_ews_connection_get_attachments_sync
|
|
|
ddbc0f |
(EEwsConnection *cnc,
|
|
|
ddbc0f |
gint pri,
|
|
|
ddbc0f |
const gchar *comp_uid,
|