diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-02-11 23:38:29 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-02-11 23:38:29 +0800 |
commit | 3b11207dcbd01b5a18f93a406d267bb786829471 (patch) | |
tree | 0099cd20b25125d0473538126664f84526ca92ce /modules/online-accounts | |
parent | 60d1c3054aa60d02c763538d6b1f16d9d6ab6ade (diff) | |
download | gsoc2013-evolution-3b11207dcbd01b5a18f93a406d267bb786829471.tar gsoc2013-evolution-3b11207dcbd01b5a18f93a406d267bb786829471.tar.gz gsoc2013-evolution-3b11207dcbd01b5a18f93a406d267bb786829471.tar.bz2 gsoc2013-evolution-3b11207dcbd01b5a18f93a406d267bb786829471.tar.lz gsoc2013-evolution-3b11207dcbd01b5a18f93a406d267bb786829471.tar.xz gsoc2013-evolution-3b11207dcbd01b5a18f93a406d267bb786829471.tar.zst gsoc2013-evolution-3b11207dcbd01b5a18f93a406d267bb786829471.zip |
Use camel_service_ref_session().
Diffstat (limited to 'modules/online-accounts')
-rw-r--r-- | modules/online-accounts/camel-sasl-xoauth.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/online-accounts/camel-sasl-xoauth.c b/modules/online-accounts/camel-sasl-xoauth.c index 45ad212475..1ebe99c439 100644 --- a/modules/online-accounts/camel-sasl-xoauth.c +++ b/modules/online-accounts/camel-sasl-xoauth.c @@ -278,12 +278,12 @@ sasl_xoauth_challenge_sync (CamelSasl *sasl, gboolean success; service = camel_sasl_get_service (sasl); - session = camel_service_get_session (service); + session = camel_service_ref_session (service); registry = e_mail_session_get_registry (E_MAIL_SESSION (session)); goa_client = goa_client_new_sync (cancellable, error); if (goa_client == NULL) - return NULL; + goto exit; uid = camel_service_get_uid (service); account_id = sasl_xoauth_find_account_id (registry, uid); @@ -299,7 +299,7 @@ sasl_xoauth_challenge_sync (CamelSasl *sasl, "the org.gnome.OnlineAccounts service from " "which to obtain an authentication token.")); g_object_unref (goa_client); - return NULL; + goto exit; } goa_account = goa_object_get_account (goa_object); @@ -364,6 +364,9 @@ sasl_xoauth_challenge_sync (CamelSasl *sasl, /* IMAP and SMTP services will Base64-encode the request. */ +exit: + g_object_unref (session); + return byte_array; } |