diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/calendar/e-task-shell-view-private.c | 2 | ||||
-rw-r--r-- | modules/online-accounts/camel-sasl-xoauth.c | 22 |
2 files changed, 18 insertions, 6 deletions
diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c index 8c02ceccbc..3467c12190 100644 --- a/modules/calendar/e-task-shell-view-private.c +++ b/modules/calendar/e-task-shell-view-private.c @@ -506,8 +506,6 @@ e_task_shell_view_delete_completed (ETaskShellView *task_shell_view) G_STRFUNC, error->message); g_clear_error (&error); } - - icalcomponent_free (component); } e_cal_client_free_icalcomp_slist (objects); diff --git a/modules/online-accounts/camel-sasl-xoauth.c b/modules/online-accounts/camel-sasl-xoauth.c index 14ecb29bc4..edf5c6eec3 100644 --- a/modules/online-accounts/camel-sasl-xoauth.c +++ b/modules/online-accounts/camel-sasl-xoauth.c @@ -16,9 +16,14 @@ * */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <e-util/e-account-utils.h> + #include "camel-sasl-xoauth.h" -#include <config.h> #include <glib/gi18n-lib.h> #define GOA_API_IS_SUBJECT_TO_CHANGE @@ -352,21 +357,30 @@ sasl_xoauth_challenge_sync (CamelSasl *sasl, GoaAccount *goa_account; GByteArray *parameters = NULL; CamelService *service; + EAccount *account; CamelURL *url; const gchar *account_id; + const gchar *uid; gchar *xoauth_param = NULL; gboolean success; service = camel_sasl_get_service (sasl); - url = camel_service_get_camel_url (service); - account_id = camel_url_get_param (url, GOA_KEY); - g_return_val_if_fail (account_id != NULL, NULL); + uid = camel_service_get_uid (service); + account = e_get_account_by_uid (uid); + g_return_val_if_fail (account != NULL, NULL); goa_client = goa_client_new_sync (cancellable, error); if (goa_client == NULL) return NULL; + url = camel_url_new (account->source->url, error); + if (url == NULL) + return NULL; + + account_id = camel_url_get_param (url, GOA_KEY); goa_object = sasl_xoauth_get_account_by_id (goa_client, account_id); + camel_url_free (url); + if (goa_object == NULL) { g_set_error_literal ( error, CAMEL_SERVICE_ERROR, |