[evolution-mapi/f14/master] Update to 0.31.91
Milan Crha
mcrha at fedoraproject.org
Mon Aug 30 13:15:39 UTC 2010
commit 4c44e5ab3f7ccfd2a6cac9a9c4ca855cb70f4a13
Author: Milan Crha <mcrha at redhat.com>
Date: Mon Aug 30 15:15:32 2010 +0200
Update to 0.31.91
.gitignore | 1 +
evolution-mapi-0.31.91-gn627999.patch | 244 +++++++++++++++++++++++++++++++++
evolution-mapi.spec | 11 ++-
sources | 2 +-
4 files changed, 256 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index cbbb270..d9697e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
evolution-mapi-0.31.5.tar.bz2
evolution-mapi-0.31.6.tar.bz2
evolution-mapi-0.31.90.tar.bz2
+/evolution-mapi-0.31.91.tar.bz2
diff --git a/evolution-mapi-0.31.91-gn627999.patch b/evolution-mapi-0.31.91-gn627999.patch
new file mode 100644
index 0000000..c0086a1
--- /dev/null
+++ b/evolution-mapi-0.31.91-gn627999.patch
@@ -0,0 +1,244 @@
+diff --git a/src/addressbook/e-book-backend-mapi.c b/src/addressbook/e-book-backend-mapi.c
+index 08ef743..32dc1bd 100644
+--- a/src/addressbook/e-book-backend-mapi.c
++++ b/src/addressbook/e-book-backend-mapi.c
+@@ -406,13 +406,16 @@ ebbm_load_source (EBookBackendMAPI *ebma, ESource *source, gboolean only_if_exis
+ priv->summary = e_book_backend_summary_new (summary_file_name, SUMMARY_FLUSH_TIMEOUT_SECS * 1000);
+
+ if (g_file_test (summary_file_name, G_FILE_TEST_EXISTS)) {
+- e_book_backend_summary_load (priv->summary);
++ if (!e_book_backend_summary_load (priv->summary))
++ g_unlink (summary_file_name);
+ }
+
++ g_free (summary_file_name);
++
+ if (priv->cache)
+ g_object_unref (priv->cache);
++ summary_file_name = g_build_filename (cache_dir, "cache.xml", NULL);
+ priv->cache = e_book_backend_cache_new (summary_file_name);
+-
+ g_free (summary_file_name);
+
+ e_book_backend_set_is_loaded (E_BOOK_BACKEND (ebma), TRUE);
+@@ -506,6 +509,7 @@ ebbm_authenticate_user (EBookBackendMAPI *ebma, const gchar *user, const gchar *
+ {
+ EBookBackendMAPIPrivate *priv = ebma->priv;
+ GError *mapi_error = NULL;
++ ExchangeMapiConnection *old_conn;
+
+ switch (priv->mode) {
+ case E_DATA_BOOK_MODE_LOCAL:
+@@ -521,17 +525,19 @@ ebbm_authenticate_user (EBookBackendMAPI *ebma, const gchar *user, const gchar *
+
+ e_book_backend_mapi_lock_connection (ebma);
+
+- if (priv->conn) {
+- g_object_unref (priv->conn);
+- priv->conn = NULL;
+- }
++ old_conn = priv->conn;
++ priv->conn = NULL;
+
+ /* rather reuse already established connection */
+ priv->conn = exchange_mapi_connection_find (priv->profile);
+- if (priv->conn && !exchange_mapi_connection_connected (priv->conn))
++ if (priv->conn && !exchange_mapi_connection_connected (priv->conn)) {
+ exchange_mapi_connection_reconnect (priv->conn, passwd, &mapi_error);
+- else if (!priv->conn)
++ } else if (!priv->conn) {
+ priv->conn = exchange_mapi_connection_new (priv->profile, passwd, &mapi_error);
++ }
++
++ if (old_conn)
++ g_object_unref (old_conn);
+
+ if (!priv->conn || mapi_error) {
+ if (priv->conn) {
+diff --git a/src/calendar/e-cal-backend-mapi.c b/src/calendar/e-cal-backend-mapi.c
+index bd0b5c9..7d88698 100644
+--- a/src/calendar/e-cal-backend-mapi.c
++++ b/src/calendar/e-cal-backend-mapi.c
+@@ -183,13 +183,13 @@ ecbm_authenticate (ECalBackend *backend, GError **perror)
+ {
+ ECalBackendMAPI *cbmapi;
+ ECalBackendMAPIPrivate *priv;
++ ExchangeMapiConnection *old_conn;
+ GError *mapi_error = NULL;
+
+ cbmapi = E_CAL_BACKEND_MAPI (backend);
+ priv = cbmapi->priv;
+
+- if (priv->conn)
+- g_object_unref (priv->conn);
++ old_conn = priv->conn;
+
+ /* rather reuse already established connection */
+ priv->conn = exchange_mapi_connection_find (priv->profile);
+@@ -198,6 +198,9 @@ ecbm_authenticate (ECalBackend *backend, GError **perror)
+ else if (!priv->conn)
+ priv->conn = exchange_mapi_connection_new (priv->profile, priv->password, &mapi_error);
+
++ if (old_conn)
++ g_object_unref (old_conn);
++
+ if (priv->conn && exchange_mapi_connection_connected (priv->conn)) {
+ /* Success */;
+ } else {
+diff --git a/src/camel/camel-mapi-store.c b/src/camel/camel-mapi-store.c
+index f677e7c..d5f2b70 100644
+--- a/src/camel/camel-mapi-store.c
++++ b/src/camel/camel-mapi-store.c
+@@ -430,7 +430,8 @@ mapi_connect(CamelService *service, GError **error)
+ event_mask = fnevNewMail | fnevObjectCreated | fnevObjectDeleted |
+ fnevObjectModified | fnevObjectMoved | fnevObjectCopied;
+
+- if (!store->priv->notification_data)
++ /* use MAPI_NO_NOTIFY=1 to disable notifications */
++ if (!store->priv->notification_data && g_getenv ("MAPI_NO_NOTIFY") == NULL)
+ store->priv->notification_data = camel_mapi_notification_listener_start (store, event_mask, MAPI_EVENTS_USE_STORE);
+
+ camel_store_summary_save ((CamelStoreSummary *) store->summary);
+diff --git a/src/libexchangemapi/exchange-mapi-connection.c b/src/libexchangemapi/exchange-mapi-connection.c
+index ab42dd2..d39e6c1 100644
+--- a/src/libexchangemapi/exchange-mapi-connection.c
++++ b/src/libexchangemapi/exchange-mapi-connection.c
+@@ -41,6 +41,8 @@
+ static void register_connection (ExchangeMapiConnection *conn);
+ static void unregister_connection (ExchangeMapiConnection *conn);
+ static struct mapi_session *mapi_profile_load (const gchar *profname, const gchar *password, GError **perror);
++static void ema_global_lock (void);
++static void ema_global_unlock (void);
+
+ /* GObject foo - begin */
+
+@@ -49,8 +51,8 @@ G_DEFINE_TYPE (ExchangeMapiConnection, exchange_mapi_connection, G_TYPE_OBJECT)
+ #define EXCHANGE_MAPI_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EXCHANGE_TYPE_MAPI_CONNECTION, ExchangeMapiConnectionPrivate))
+
+ /* These two macros require 'priv' variable of type ExchangeMapiConnectionPrivate */
+-#define LOCK() g_debug ("%s: %s: lock(session_lock)", G_STRLOC, G_STRFUNC); g_static_rec_mutex_lock (&priv->session_lock);
+-#define UNLOCK() g_debug ("%s: %s: unlock(session_lock)", G_STRLOC, G_STRFUNC); g_static_rec_mutex_unlock (&priv->session_lock);
++#define LOCK() g_debug ("%s: %s: lock(session/global_lock)", G_STRLOC, G_STRFUNC); g_static_rec_mutex_lock (&priv->session_lock); ema_global_lock();
++#define UNLOCK() g_debug ("%s: %s: unlock(session/global_lock)", G_STRLOC, G_STRFUNC); g_static_rec_mutex_unlock (&priv->session_lock); ema_global_unlock();
+
+ #define e_return_val_mapi_error_if_fail(expr, _code, _val) \
+ G_STMT_START { \
+@@ -1114,12 +1116,14 @@ exchange_mapi_connection_fetch_gal (ExchangeMapiConnection *conn, struct mapi_SR
+ break;
+ }
+ if (aRowSet->cRows) {
++ ema_global_unlock ();
+ for (i = 0; i < aRowSet->cRows; i++, count++) {
+ if (!cb (conn, count, n_rows, &aRowSet->aRow[i], data)) {
+ ms = MAPI_E_RESERVED;
+ break;
+ }
+ }
++ ema_global_lock ();
+ } else {
+ MAPIFreeBuffer (aRowSet);
+ break;
+@@ -1685,7 +1689,9 @@ exchange_mapi_connection_fetch_items (ExchangeMapiConnection *conn, mapi_id_t
+ item_data->total = count; //Total entries in the table.
+ item_data->index = cursor_pos + i; //cursor_pos + current_table_index
+
++ ema_global_unlock ();
+ cb_retval = cb (item_data, data);
++ ema_global_lock ();
+
+ g_free (item_data);
+ } else {
+@@ -1832,8 +1838,10 @@ exchange_mapi_connection_fetch_object_props (ExchangeMapiConnection *conn, mapi_
+ item_data->recipients = recip_list;
+ item_data->attachments = attach_list;
+
++ ema_global_unlock ();
+ /* NOTE: stream_list, recipient_list and attach_list should be freed by the callback */
+ cb (item_data, data);
++ ema_global_lock ();
+
+ g_free (item_data);
+ } else {
+@@ -3468,7 +3476,21 @@ ensure_mapi_init_called (GError **perror)
+ }
+
+ /* used when dealing with profiles */
+-static GStaticMutex profile_mutex = G_STATIC_MUTEX_INIT;
++static GStaticRecMutex profile_mutex = G_STATIC_REC_MUTEX_INIT;
++
++/* because openchange/samba4 is not thread safe */
++static void
++ema_global_lock (void)
++{
++ g_static_rec_mutex_lock (&profile_mutex);
++}
++
++/* because openchange/samba4 is not thread safe */
++static void
++ema_global_unlock (void)
++{
++ g_static_rec_mutex_unlock (&profile_mutex);
++}
+
+ static struct mapi_session *
+ mapi_profile_load (const gchar *profname, const gchar *password, GError **perror)
+@@ -3479,7 +3501,7 @@ mapi_profile_load (const gchar *profname, const gchar *password, GError **perror
+
+ e_return_val_mapi_error_if_fail (profname != NULL, MAPI_E_INVALID_PARAMETER, NULL);
+
+- g_static_mutex_lock (&profile_mutex);
++ g_static_rec_mutex_lock (&profile_mutex);
+
+ /* Initialize libexchangemapi logger*/
+ if (g_getenv ("EXCHANGEMAPI_DEBUG")) {
+@@ -3508,7 +3530,7 @@ mapi_profile_load (const gchar *profname, const gchar *password, GError **perror
+ }
+
+ cleanup:
+- g_static_mutex_unlock (&profile_mutex);
++ g_static_rec_mutex_unlock (&profile_mutex);
+ g_debug ("%s: Leaving %s ", G_STRLOC, G_STRFUNC);
+
+ return session;
+@@ -3530,12 +3552,12 @@ exchange_mapi_create_profile (const gchar *username, const gchar *password, cons
+ e_return_val_mapi_error_if_fail (username && *username && password && *password &&
+ domain && *domain && server && *server, MAPI_E_INVALID_PARAMETER, FALSE);
+
+- g_static_mutex_lock (&profile_mutex);
++ g_static_rec_mutex_lock (&profile_mutex);
+
+ g_debug ("Create profile with %s %s %s\n", username, domain, server);
+
+ if (!ensure_mapi_init_called (perror)) {
+- g_static_mutex_unlock (&profile_mutex);
++ g_static_rec_mutex_unlock (&profile_mutex);
+ return FALSE;
+ }
+
+@@ -3605,7 +3627,7 @@ exchange_mapi_create_profile (const gchar *username, const gchar *password, cons
+ mapi_object_release (&msg_store);
+ }*/
+
+- g_static_mutex_unlock (&profile_mutex);
++ g_static_rec_mutex_unlock (&profile_mutex);
+
+ return result;
+ }
+@@ -3615,7 +3637,7 @@ exchange_mapi_delete_profile (const gchar *profile, GError **perror)
+ {
+ gboolean result = FALSE;
+
+- g_static_mutex_lock (&profile_mutex);
++ g_static_rec_mutex_lock (&profile_mutex);
+
+ if (ensure_mapi_init_called (perror)) {
+ enum MAPISTATUS ms;
+@@ -3630,7 +3652,7 @@ exchange_mapi_delete_profile (const gchar *profile, GError **perror)
+ }
+ }
+
+- g_static_mutex_unlock (&profile_mutex);
++ g_static_rec_mutex_unlock (&profile_mutex);
+
+ return result;
+ }
diff --git a/evolution-mapi.spec b/evolution-mapi.spec
index 17495ea..7037dc8 100644
--- a/evolution-mapi.spec
+++ b/evolution-mapi.spec
@@ -11,7 +11,7 @@
### Abstract ###
Name: evolution-mapi
-Version: 0.31.90
+Version: 0.31.91
Release: 1%{?dist}
Group: Applications/Productivity
Summary: Evolution extension for MS Exchange 2007 servers
@@ -20,6 +20,10 @@ URL: http://www.gnome.org/projects/evolution-mapi/
Source: http://ftp.gnome.org/pub/gnome/sources/evolution-mapi/0.31/evolution-mapi-%{version}.tar.bz2
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+### Patches ###
+
+Patch1: evolution-mapi-0.31.91-gn627999.patch
+
### Dependencies ###
Requires: evolution >= %{evo_version}
@@ -51,6 +55,7 @@ Development files needed for building things which link against %{name}.
%prep
%setup -q
+%patch1 -p1 -b .gn627999
%build
@@ -107,6 +112,10 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/pkgconfig/libexchangemapi-1.0.pc
%changelog
+* Mon Aug 30 2010 Milan Crha <mcrha at redhat.com> - 0.31.91-1
+- Update to 0.31.91
+- Add patch for Gnome bug #627999 (Cannot autocomplete)
+
* Mon Aug 16 2010 Matthew Barnes <mbarnes at redhat.com> - 0.31.90-1
- Update to 0.31.90
diff --git a/sources b/sources
index 0f9117d..58cff13 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a6e644ab3317fa16e47d52da7f8236c0 evolution-mapi-0.31.90.tar.bz2
+b752aa151cc54c78c2cd7f7822ebeb7a evolution-mapi-0.31.91.tar.bz2
More information about the scm-commits
mailing list