[evolution-mapi] Bug #615776 - Do not use its own copy of camel-private.h
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Bug #615776 - Do not use its own copy of camel-private.h
- Date: Thu, 15 Apr 2010 18:51:21 +0000 (UTC)
commit e30e8c46691aacc1078813f2e29a33782441a1a0
Author: Milan Crha <mcrha redhat com>
Date: Thu Apr 15 20:50:51 2010 +0200
Bug #615776 - Do not use its own copy of camel-private.h
src/camel/Makefile.am | 3 +-
src/camel/camel-mapi-folder.c | 58 +++++------
src/camel/camel-mapi-notifications.c | 18 ++--
src/camel/camel-mapi-store-summary.c | 13 +--
src/camel/camel-mapi-store.c | 46 ++++-----
src/camel/camel-private.h | 182 ----------------------------------
6 files changed, 63 insertions(+), 257 deletions(-)
---
diff --git a/src/camel/Makefile.am b/src/camel/Makefile.am
index d3116d6..eb1f108 100644
--- a/src/camel/Makefile.am
+++ b/src/camel/Makefile.am
@@ -30,8 +30,7 @@ noinst_HEADERS = \
camel-mapi-transport.h \
camel-mapi-utils.h \
camel-mapi-notifications.h \
- camel-mapi-private.h \
- camel-private.h
+ camel-mapi-private.h
libcamelmapi_la_LDFLAGS = -avoid-version -module $(NO_UNDEFINED)
libcamelmapi_la_LIBADD = \
diff --git a/src/camel/camel-mapi-folder.c b/src/camel/camel-mapi-folder.c
index 42409d6..9b0870e 100644
--- a/src/camel/camel-mapi-folder.c
+++ b/src/camel/camel-mapi-folder.c
@@ -36,8 +36,6 @@
#include <exchange-mapi-folder.h>
#include <exchange-mapi-cal-utils.h>
-#include <camel/camel-private.h>
-
#include "camel-mapi-store.h"
#include "camel-mapi-store-summary.h"
#include "camel-mapi-folder.h"
@@ -589,9 +587,9 @@ mapi_update_cache (CamelFolder *folder, GSList *list, CamelFolderChangeInfo **ch
}
if ((item->header.from_type != NULL) && !g_utf8_collate (item->header.from_type, "EX")) {
- CAMEL_SERVICE_REC_LOCK (mapi_store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
from_email = exchange_mapi_connection_ex_to_smtp (camel_mapi_store_get_exchange_connection (mapi_store), item->header.from_email);
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
g_free (item->header.from_email);
item->header.from_email = g_strdup (from_email);
@@ -709,7 +707,7 @@ mapi_sync_deleted (CamelSession *session, CamelSessionThreadMsg *msg)
camel_operation_start (NULL, _("Retrieving message IDs from server for %s"), m->folder->name);
- CAMEL_SERVICE_REC_LOCK (mapi_store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
/*Get the UID list from server.*/
exchange_mapi_connection_fetch_items (camel_mapi_store_get_exchange_connection (mapi_store), m->folder_id, NULL, NULL,
@@ -720,7 +718,7 @@ mapi_sync_deleted (CamelSession *session, CamelSessionThreadMsg *msg)
camel_operation_end (NULL);
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
/* Check if we have to stop */
if (camel_operation_cancel_check(NULL))
@@ -786,10 +784,10 @@ mapi_sync_deleted_free (CamelSession *session, CamelSessionThreadMsg *msg)
if (mapi_summary) {
CamelException ex = CAMEL_EXCEPTION_INITIALISER;
- CAMEL_SERVICE_REC_LOCK (m->folder->parent_store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (m->folder->parent_store), CS_REC_CONNECT_LOCK);
g_free (mapi_summary->sync_time_stamp);
mapi_summary->sync_time_stamp = NULL;
- CAMEL_SERVICE_REC_UNLOCK (m->folder->parent_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (m->folder->parent_store), CS_REC_CONNECT_LOCK);
mapi_refresh_folder (m->folder, &ex);
@@ -837,13 +835,13 @@ mapi_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
folder_id = camel_mapi_store_folder_id_lookup (mapi_store, folder->full_name);
exchange_mapi_util_mapi_id_from_string (folder_id, &fid);
- CAMEL_SERVICE_REC_LOCK (mapi_store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
if (!camel_mapi_store_connected (mapi_store, ex)) {
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
camel_exception_clear (ex);
return;
}
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
count = camel_folder_summary_count (folder->summary);
CAMEL_MAPI_FOLDER_REC_LOCK (folder, cache_lock);
@@ -918,15 +916,15 @@ mapi_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
*/
if (read_items) {
- CAMEL_SERVICE_REC_LOCK (mapi_store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
exchange_mapi_connection_set_flags (camel_mapi_store_get_exchange_connection (mapi_store), 0, fid, read_items, 0, options);
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
g_slist_free (read_items);
}
/* Remove messages from server*/
if (deleted_items) {
- CAMEL_SERVICE_REC_LOCK (mapi_store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
if ((mapi_folder->type & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_TRASH) {
exchange_mapi_connection_remove_items (camel_mapi_store_get_exchange_connection (mapi_store), 0, fid, deleted_items);
} else {
@@ -934,7 +932,7 @@ mapi_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
exchange_mapi_connection_move_items (camel_mapi_store_get_exchange_connection (mapi_store), fid, deleted_items_fid, deleted_items);
}
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
}
/*Remove messages from local cache*/
@@ -959,9 +957,9 @@ mapi_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
/* TODO */
}
- CAMEL_SERVICE_REC_LOCK (mapi_store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
mapi_sync_summary (folder, ex);
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
}
gboolean
@@ -994,14 +992,14 @@ camel_mapi_folder_fetch_summary (CamelStore *store, const mapi_id_t fid, struct
camel_operation_start (NULL, _("Fetching summary information for new messages in")); /* %s"), folder->name); */
- CAMEL_SERVICE_REC_LOCK (mapi_store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
status = exchange_mapi_connection_fetch_items (camel_mapi_store_get_exchange_connection (mapi_store), fid, res, sort, summary_prop_list,
G_N_ELEMENTS (summary_prop_list),
NULL, NULL, fetch_items_summary_cb,
fetch_data, options);
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
camel_operation_end (NULL);
@@ -1046,7 +1044,7 @@ mapi_refresh_folder(CamelFolder *folder, CamelException *ex)
mapi_folder->need_refresh = TRUE;
}
- CAMEL_SERVICE_REC_LOCK (mapi_store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
is_locked = TRUE;
if (!camel_mapi_store_connected (mapi_store, ex))
@@ -1118,7 +1116,7 @@ mapi_refresh_folder(CamelFolder *folder, CamelException *ex)
camel_folder_summary_touch (folder->summary);
mapi_sync_summary (folder, ex);
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
is_locked = FALSE;
/* Downsync deleted items */
@@ -1137,7 +1135,7 @@ mapi_refresh_folder(CamelFolder *folder, CamelException *ex)
end1:
if (is_locked)
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
g_slist_foreach (fetch_data->items_list, (GFunc) mapi_item_free, NULL);
g_slist_free (fetch_data->items_list);
@@ -1496,9 +1494,9 @@ mapi_mime_set_msg_headers (CamelFolder *folder, CamelMimeMessage *msg, MapiItem
if (item->header.from) {
if ((item->header.from_type != NULL) && !g_utf8_collate (item->header.from_type, "EX")) {
- CAMEL_SERVICE_REC_LOCK (mapi_store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
from_email = exchange_mapi_connection_ex_to_smtp (camel_mapi_store_get_exchange_connection (mapi_store), item->header.from_email);
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
g_free (item->header.from_email);
item->header.from_email = g_strdup (from_email);
}
@@ -1870,13 +1868,13 @@ mapi_folder_get_message( CamelFolder *folder, const gchar *uid, CamelException *
options |= MAPI_OPTIONS_USE_PFSTORE;
}
- CAMEL_SERVICE_REC_LOCK (mapi_store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
exchange_mapi_connection_fetch_item (camel_mapi_store_get_exchange_connection (mapi_store), id_folder, id_message,
camel_GetPropsList, G_N_ELEMENTS (camel_GetPropsList),
camel_build_name_id, NULL,
fetch_item_cb, &item,
options);
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
if (item == NULL) {
camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_INVALID, _("Could not get message"));
@@ -1999,9 +1997,9 @@ mapi_expunge (CamelFolder *folder, CamelException *ex)
exchange_mapi_util_mapi_id_from_string (folder_id, &fid);
if ((mapi_folder->type & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_TRASH) {
- CAMEL_SERVICE_REC_LOCK (mapi_store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
status = exchange_mapi_connection_empty_folder (camel_mapi_store_get_exchange_connection (mapi_store), fid);
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
if (status) {
camel_folder_freeze (folder);
@@ -2042,11 +2040,11 @@ mapi_expunge (CamelFolder *folder, CamelException *ex)
deleted_items_uid_head = deleted_items_uid;
if (deleted_items) {
- CAMEL_SERVICE_REC_LOCK (mapi_store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
status = exchange_mapi_connection_remove_items (camel_mapi_store_get_exchange_connection (mapi_store), 0, fid, deleted_items);
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
if (status) {
while (deleted_items_uid) {
diff --git a/src/camel/camel-mapi-notifications.c b/src/camel/camel-mapi-notifications.c
index 503fd9e..cfe0bf7 100644
--- a/src/camel/camel-mapi-notifications.c
+++ b/src/camel/camel-mapi-notifications.c
@@ -35,8 +35,6 @@
#include <glib/gstdio.h>
#include <gio/gio.h>
-#include <camel/camel-private.h>
-
#include "camel-mapi-store.h"
#include "camel-mapi-folder.h"
#include "camel-mapi-store-summary.h"
@@ -115,9 +113,9 @@ process_mapi_new_mail_notif (CamelMapiStore *store, struct NewMailNotification *
fetch_data->changes = camel_folder_change_info_new ();
fetch_data->folder = folder;
- CAMEL_SERVICE_REC_LOCK (store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
camel_mapi_folder_fetch_summary ((CamelStore *)store, new_mail_notif->FID, res, NULL, fetch_data, options);
- CAMEL_SERVICE_REC_UNLOCK (store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
camel_folder_summary_touch (folder->summary);
/* mapi_sync_summary */
@@ -220,11 +218,11 @@ mapi_push_notification_listener_thread (gpointer data)
cb_data->callback = mapi_notifications_continue_check;
cb_data->data = thread_data;
- CAMEL_SERVICE_REC_LOCK (mapi_store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
conn = camel_mapi_store_get_exchange_connection (mapi_store);
if (!conn) {
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
g_return_val_if_reached (NULL);
}
@@ -235,11 +233,11 @@ mapi_push_notification_listener_thread (gpointer data)
&thread_data->connection, mapi_notifications_filter,
thread_data->event_data);
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
exchange_mapi_connection_events_monitor (conn, cb_data); /*Blocking call. Don't hold locks here*/
exchange_mapi_connection_events_unsubscribe (conn, thread_data->connection);
} else
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
g_free (cb_data);
g_object_unref (conn);
@@ -287,8 +285,8 @@ camel_mapi_notification_listener_stop (CamelMapiStore *mstore, gpointer start_va
g_free (thread_data);
camel_object_ref (mstore);
- CAMEL_SERVICE_REC_LOCK (mstore, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (mstore), CS_REC_CONNECT_LOCK);
camel_mapi_store_unset_notification_data (mstore);
- CAMEL_SERVICE_REC_UNLOCK (mstore, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mstore), CS_REC_CONNECT_LOCK);
camel_object_unref (mstore);
}
diff --git a/src/camel/camel-mapi-store-summary.c b/src/camel/camel-mapi-store-summary.c
index 9d918eb..e82bde1 100644
--- a/src/camel/camel-mapi-store-summary.c
+++ b/src/camel/camel-mapi-store-summary.c
@@ -32,7 +32,6 @@
#include <unistd.h>
#include <glib.h>
-#include <camel/camel-private.h>
#include <libedataserver/e-memory.h>
#include "camel-mapi-store.h"
@@ -211,24 +210,24 @@ store_info_set_string(CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const
switch (type) {
case CAMEL_MAPI_STORE_INFO_FULL_NAME:
d(printf("Set full name %s -> %s\n", isi->full_name, str));
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
+ camel_store_summary_lock (s, CSS_SUMMARY_LOCK);
g_free(isi->full_name);
isi->full_name = g_strdup(str);
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
+ camel_store_summary_unlock (s, CSS_SUMMARY_LOCK);
break;
case CAMEL_MAPI_STORE_INFO_FOLDER_ID:
d(printf("Set folder id %s -> %s\n", isi->folder_id, str));
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
+ camel_store_summary_lock (s, CSS_SUMMARY_LOCK);
g_free(isi->folder_id);
isi->folder_id = g_strdup(str);
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
+ camel_store_summary_unlock (s, CSS_SUMMARY_LOCK);
break;
case CAMEL_MAPI_STORE_INFO_PARENT_ID:
d(printf("Set parent id %s -> %s\n", isi->parent_id, str));
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
+ camel_store_summary_lock (s, CSS_SUMMARY_LOCK);
g_free(isi->parent_id);
isi->parent_id = g_strdup(str);
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
+ camel_store_summary_unlock (s, CSS_SUMMARY_LOCK);
break;
default:
camel_mapi_store_summary_parent->store_info_set_string(s, mi, type, str);
diff --git a/src/camel/camel-mapi-store.c b/src/camel/camel-mapi-store.c
index a2820de..509b3c0 100644
--- a/src/camel/camel-mapi-store.c
+++ b/src/camel/camel-mapi-store.c
@@ -33,8 +33,6 @@
#include <glib/gi18n.h>
#include <glib/gstdio.h>
-#include <camel/camel-private.h>
-
#include "camel-mapi-store.h"
#include "camel-mapi-folder.h"
#include "camel-mapi-store-summary.h"
@@ -423,14 +421,14 @@ mapi_connect(CamelService *service, CamelException *ex)
camel_service_construct (service, service->session, service->provider, service->url, ex);
}
- CAMEL_SERVICE_REC_LOCK (service, connect_lock);
+ camel_service_lock (service, CS_REC_CONNECT_LOCK);
if (check_for_connection (service, ex)) {
- CAMEL_SERVICE_REC_UNLOCK (service, connect_lock);
+ camel_service_unlock (service, CS_REC_CONNECT_LOCK);
return TRUE;
}
if (!mapi_auth_loop (service, ex)) {
- CAMEL_SERVICE_REC_UNLOCK (service, connect_lock);
+ camel_service_unlock (service, CS_REC_CONNECT_LOCK);
camel_service_disconnect (service, TRUE, NULL);
return FALSE;
}
@@ -442,16 +440,12 @@ mapi_connect(CamelService *service, CamelException *ex)
event_mask = fnevNewMail | fnevObjectCreated | fnevObjectDeleted |
fnevObjectModified | fnevObjectMoved | fnevObjectCopied;
- CAMEL_SERVICE_REC_LOCK (store, connect_lock);
-
if (!store->priv->notification_data)
store->priv->notification_data = camel_mapi_notification_listener_start (store, event_mask, MAPI_EVENTS_USE_STORE);
- CAMEL_SERVICE_REC_UNLOCK (store, connect_lock);
-
camel_store_summary_save ((CamelStoreSummary *) store->summary);
- CAMEL_SERVICE_REC_UNLOCK (service, connect_lock);
+ camel_service_unlock (service, CS_REC_CONNECT_LOCK);
return TRUE;
}
@@ -593,7 +587,7 @@ mapi_create_folder(CamelStore *store, const gchar *parent_name, const gchar *fol
return NULL;
}
- CAMEL_SERVICE_REC_LOCK (store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
exchange_mapi_util_mapi_id_from_string (parent_id, &parent_fid);
new_folder_id = exchange_mapi_connection_create_folder (priv->conn, olFolderInbox, parent_fid, folder_name);
@@ -611,7 +605,7 @@ mapi_create_folder(CamelStore *store, const gchar *parent_name, const gchar *fol
camel_object_trigger_event (CAMEL_OBJECT (store), "folder_created", root);
}
- CAMEL_SERVICE_REC_UNLOCK (store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
return root;
}
@@ -663,10 +657,10 @@ mapi_delete_folder(CamelStore *store, const gchar *folder_name, CamelException *
mapi_id_t folder_fid;
gboolean status = FALSE;
- CAMEL_SERVICE_REC_LOCK (store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
if (!camel_mapi_store_connected ((CamelMapiStore *)store, ex)) {
- CAMEL_SERVICE_REC_UNLOCK (store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
return;
}
@@ -686,8 +680,7 @@ mapi_delete_folder(CamelStore *store, const gchar *folder_name, CamelException *
g_hash_table_remove (priv->name_hash, folder_name);
}
- CAMEL_SERVICE_REC_UNLOCK (store, connect_lock);
-
+ camel_service_unlock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
}
static void
@@ -750,10 +743,10 @@ mapi_rename_folder(CamelStore *store, const gchar *old_name, const gchar *new_na
const gchar *old_fid_str, *new_parent_fid_str = NULL;
mapi_id_t old_fid;
- CAMEL_SERVICE_REC_LOCK (mapi_store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
if (!camel_mapi_store_connected ((CamelMapiStore *)store, ex)) {
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
return;
}
@@ -764,7 +757,7 @@ mapi_rename_folder(CamelStore *store, const gchar *old_name, const gchar *new_na
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Cannot rename MAPI folder '%s'. Folder does not exist."),
old_name);
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
return;
}
@@ -775,6 +768,7 @@ mapi_rename_folder(CamelStore *store, const gchar *old_name, const gchar *new_na
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Cannot rename MAPI default folder '%s' to '%s'."),
old_name, new_name);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
return;
}
@@ -798,7 +792,7 @@ mapi_rename_folder(CamelStore *store, const gchar *old_name, const gchar *new_na
if (!exchange_mapi_util_mapi_id_from_string (old_fid_str, &old_fid)) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot rename MAPI folder '%s' to '%s'"), old_name, new_name);
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
g_free (old_parent);
g_free (new_parent);
return;
@@ -814,7 +808,7 @@ mapi_rename_folder(CamelStore *store, const gchar *old_name, const gchar *new_na
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Cannot rename MAPI folder '%s' to '%s'"), old_name, new_name);
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
g_free (old_parent);
g_free (new_parent);
return;
@@ -862,7 +856,7 @@ mapi_rename_folder(CamelStore *store, const gchar *old_name, const gchar *new_na
!exchange_mapi_util_mapi_id_from_string (old_parent_fid_str, &old_parent_fid) ||
!exchange_mapi_util_mapi_id_from_string (new_parent_fid_str, &new_parent_fid) ||
!exchange_mapi_connection_move_folder (priv->conn, old_fid, old_parent_fid, new_parent_fid, tmp)) {
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot rename MAPI folder '%s' to '%s'"), old_name, new_name);
g_free (old_parent);
g_free (new_parent);
@@ -885,7 +879,7 @@ mapi_rename_folder(CamelStore *store, const gchar *old_name, const gchar *new_na
g_free (folder_id);
}
- CAMEL_SERVICE_REC_UNLOCK (mapi_store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
si = camel_store_summary_path ((CamelStoreSummary *)mapi_store->summary, old_name);
if (si) {
@@ -1571,7 +1565,7 @@ mapi_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, CamelEx
* is used as is here.
*/
- CAMEL_SERVICE_REC_LOCK (store, connect_lock);
+ camel_service_lock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
if (((CamelOfflineStore *) store)->state == CAMEL_OFFLINE_STORE_NETWORK_AVAIL) {
if (((CamelService *)store)->status == CAMEL_SERVICE_DISCONNECTED) {
@@ -1591,14 +1585,14 @@ mapi_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, CamelEx
mapi_folders_sync (mapi_store, top, flags, ex);
if (camel_exception_is_set (ex)) {
- CAMEL_SERVICE_REC_UNLOCK (store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
return NULL;
}
camel_store_summary_touch ((CamelStoreSummary *)mapi_store->summary);
camel_store_summary_save ((CamelStoreSummary *)mapi_store->summary);
}
- CAMEL_SERVICE_REC_UNLOCK (store, connect_lock);
+ camel_service_unlock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
s_count = camel_store_summary_count((CamelStoreSummary *)mapi_store->summary);
info = mapi_get_folder_info_offline (store, top, flags, ex);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]