summaryrefslogtreecommitdiff
path: root/camel/camel-imapx-store.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-07-12 09:04:52 -0400
committerMatthew Barnes <mbarnes@redhat.com>2013-07-12 15:27:13 -0400
commit0bd1a659fd0c24e039838e79075249aef341d274 (patch)
treeaa05273c38b727c43bff3b2f20d065009b86c214 /camel/camel-imapx-store.c
parentffd4d14662f173ac97620da470fb35cdc5ad1c83 (diff)
downloadevolution-data-server-0bd1a659fd0c24e039838e79075249aef341d274.tar.gz
CamelIMAPXStore: Further cleanups.
Diffstat (limited to 'camel/camel-imapx-store.c')
-rw-r--r--camel/camel-imapx-store.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/camel/camel-imapx-store.c b/camel/camel-imapx-store.c
index f41cbb5bb..dd8e928d3 100644
--- a/camel/camel-imapx-store.c
+++ b/camel/camel-imapx-store.c
@@ -339,39 +339,39 @@ imapx_connect_sync (CamelService *service,
GCancellable *cancellable,
GError **error)
{
- CamelIMAPXStore *imapx_store;
+ CamelIMAPXStorePrivate *priv;
CamelIMAPXServer *imapx_server;
gboolean success;
- imapx_store = CAMEL_IMAPX_STORE (service);
- imapx_server = camel_imapx_server_new (imapx_store);
+ priv = CAMEL_IMAPX_STORE_GET_PRIVATE (service);
- g_mutex_lock (&imapx_store->priv->server_lock);
+ imapx_server = camel_imapx_server_new (CAMEL_IMAPX_STORE (service));
+
+ g_mutex_lock (&priv->server_lock);
/* We need to share the CamelIMAPXServer instance with the
* authenticate_sync() method, but we don't want other parts
* getting at it just yet. So stash it in a special private
* variable while connecting to the IMAP server. */
- g_warn_if_fail (imapx_store->priv->connecting_server == NULL);
- imapx_store->priv->connecting_server = g_object_ref (imapx_server);
+ g_warn_if_fail (priv->connecting_server == NULL);
+ priv->connecting_server = g_object_ref (imapx_server);
- g_mutex_unlock (&imapx_store->priv->server_lock);
+ g_mutex_unlock (&priv->server_lock);
success = camel_imapx_server_connect (
imapx_server, cancellable, error);
- g_mutex_lock (&imapx_store->priv->server_lock);
+ g_mutex_lock (&priv->server_lock);
- g_warn_if_fail (imapx_store->priv->connecting_server == imapx_server);
- g_clear_object (&imapx_store->priv->connecting_server);
+ g_warn_if_fail (priv->connecting_server == imapx_server);
+ g_clear_object (&priv->connecting_server);
if (success) {
- g_clear_object (&imapx_store->priv->connected_server);
- imapx_store->priv->connected_server = imapx_server;
- g_object_ref (imapx_server);
+ g_clear_object (&priv->connected_server);
+ priv->connected_server = g_object_ref (imapx_server);
}
- g_mutex_unlock (&imapx_store->priv->server_lock);
+ g_mutex_unlock (&priv->server_lock);
g_clear_object (&imapx_server);
@@ -384,16 +384,16 @@ imapx_disconnect_sync (CamelService *service,
GCancellable *cancellable,
GError **error)
{
- CamelIMAPXStore *imapx_store;
+ CamelIMAPXStorePrivate *priv;
- imapx_store = CAMEL_IMAPX_STORE (service);
+ priv = CAMEL_IMAPX_STORE_GET_PRIVATE (service);
- g_mutex_lock (&imapx_store->priv->server_lock);
+ g_mutex_lock (&priv->server_lock);
- g_warn_if_fail (imapx_store->priv->connecting_server == NULL);
- g_clear_object (&imapx_store->priv->connected_server);
+ g_warn_if_fail (priv->connecting_server == NULL);
+ g_clear_object (&priv->connected_server);
- g_mutex_unlock (&imapx_store->priv->server_lock);
+ g_mutex_unlock (&priv->server_lock);
return TRUE;
}
@@ -404,16 +404,16 @@ imapx_authenticate_sync (CamelService *service,
GCancellable *cancellable,
GError **error)
{
- CamelIMAPXStore *imapx_store;
+ CamelIMAPXStorePrivate *priv;
CamelIMAPXServer *imapx_server;
CamelAuthenticationResult result;
- imapx_store = CAMEL_IMAPX_STORE (service);
+ priv = CAMEL_IMAPX_STORE_GET_PRIVATE (service);
/* This should have been set for us by connect_sync(). */
- g_mutex_lock (&imapx_store->priv->server_lock);
- imapx_server = g_object_ref (imapx_store->priv->connecting_server);
- g_mutex_unlock (&imapx_store->priv->server_lock);
+ g_mutex_lock (&priv->server_lock);
+ imapx_server = g_object_ref (priv->connecting_server);
+ g_mutex_unlock (&priv->server_lock);
result = camel_imapx_server_authenticate (
imapx_server, mechanism, cancellable, error);