rpms/evolution-data-server/devel evolution-data-server-1.8.0-kill-emutex.patch, NONE, 1.1 evolution-data-server-1.8.1-kill-ethread.patch, NONE, 1.1 evolution-data-server-1.9.1-kill-ememory.patch, NONE, 1.1 evolution-data-server.spec, 1.132, 1.133 Jerusalem.ics, 1.1, NONE evolution-data-server-1.8.1-ethread.patch, 1.1, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Oct 27 20:31:20 UTC 2006
Author: mbarnes
Update of /cvs/dist/rpms/evolution-data-server/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv30161
Modified Files:
evolution-data-server.spec
Added Files:
evolution-data-server-1.8.0-kill-emutex.patch
evolution-data-server-1.8.1-kill-ethread.patch
evolution-data-server-1.9.1-kill-ememory.patch
Removed Files:
Jerusalem.ics evolution-data-server-1.8.1-ethread.patch
Log Message:
* Mon Oct 16 2006 Matthew Barnes <mbarnes at redhat.com> - 1.9.1-1.fc7
- Update to 1.9.1
- Add patch for Gnome.org bug #356177 (deprecate EMutex).
- Add patch for Gnome.org bug #363695 (deprecate EMemPool, EStrv, EPoolv).
- Remove Jerusalem.ics timezone file (fixed upstream).
- Remove patch for RH bug #198935 (fixed upstream).
evolution-data-server-1.8.0-kill-emutex.patch:
camel-folder.c | 30 +++---
camel-object.c | 26 ++---
camel-private.h | 37 +++++--
camel-provider.c | 7 -
camel-service.c | 22 ++--
camel-store.c | 10 +-
camel-text-index.c | 12 +-
providers/groupwise/camel-groupwise-folder.c | 115 +++++++++++-------------
providers/groupwise/camel-groupwise-private.h | 21 ++--
providers/groupwise/camel-groupwise-store.c | 77 +++++++---------
providers/imap/camel-imap-command.c | 18 +--
providers/imap/camel-imap-folder.c | 124 ++++++++++++--------------
providers/imap/camel-imap-private.h | 24 ++---
providers/imap/camel-imap-store.c | 73 +++++++--------
providers/nntp/camel-nntp-folder.c | 26 ++---
providers/nntp/camel-nntp-store.c | 37 +++----
16 files changed, 332 insertions(+), 327 deletions(-)
--- NEW FILE evolution-data-server-1.8.0-kill-emutex.patch ---
--- evolution-data-server-1.8.0/camel/camel-object.c.emutex 2006-09-02 02:36:54.000000000 -0400
+++ evolution-data-server-1.8.0/camel/camel-object.c 2006-09-14 10:48:11.000000000 -0400
@@ -52,7 +52,7 @@
/* A 'locked' hooklist, that is only allocated on demand */
typedef struct _CamelHookList {
- EMutex *lock;
+ GStaticRecMutex lock;
unsigned int depth:30; /* recursive event depth */
unsigned int flags:2; /* flags, see below */
@@ -125,7 +125,8 @@
static void camel_object_free_hooks(CamelObject *o);
static void camel_object_bag_remove_unlocked(CamelObjectBag *inbag, CamelObject *o, CamelHookList *hooks);
-#define camel_object_unget_hooks(o) (e_mutex_unlock((CAMEL_OBJECT(o)->hooks->lock)))
+#define camel_object_unget_hooks(o) \
+ (g_static_rec_mutex_unlock(&CAMEL_OBJECT(o)->hooks->lock))
/* ********************************************************************** */
@@ -137,7 +138,7 @@
static unsigned int pair_id = 1;
/* type-lock must be recursive, for atomically creating classes */
-static EMutex *type_lock;
+static GStaticRecMutex type_lock = G_STATIC_REC_MUTEX_INIT;
/* ref-lock must be global :-( for object bags to work */
static GMutex *ref_lock;
@@ -150,12 +151,12 @@
#define P_LOCK(l) (pthread_mutex_lock(&l))
#define P_UNLOCK(l) (pthread_mutex_unlock(&l))
-#define E_LOCK(l) (e_mutex_lock(l))
-#define E_UNLOCK(l) (e_mutex_unlock(l))
#define CLASS_LOCK(k) (g_mutex_lock((((CamelObjectClass *)k)->lock)))
#define CLASS_UNLOCK(k) (g_mutex_unlock((((CamelObjectClass *)k)->lock)))
#define REF_LOCK() (g_mutex_lock(ref_lock))
#define REF_UNLOCK() (g_mutex_unlock(ref_lock))
+#define TYPE_LOCK() (g_static_rec_mutex_lock(&type_lock))
+#define TYPE_UNLOCK() (g_static_rec_mutex_unlock(&type_lock))
static struct _CamelHookPair *
pair_alloc(void)
@@ -216,7 +217,6 @@
init = TRUE;
pair_chunks = e_memchunk_new(16, sizeof(CamelHookPair));
hook_chunks = e_memchunk_new(16, sizeof(CamelHookList));
- type_lock = e_mutex_new(E_MUTEX_REC);
type_chunks = e_memchunk_new(32, sizeof(CamelType));
type_table = g_hash_table_new(NULL, NULL);
ref_lock = g_mutex_new();
@@ -723,7 +723,7 @@
/*int offset;
size_t size;*/
- E_LOCK(type_lock);
+ TYPE_LOCK();
/* Have to check creation, it might've happened in another thread before we got here */
klass = g_hash_table_lookup(type_table, name);
@@ -734,7 +734,7 @@
g_warning("camel_type_register: Trying to re-register class '%s'", name);
klass = NULL;
}
- E_UNLOCK(type_lock);
+ TYPE_UNLOCK();
return klass;
}
@@ -758,7 +758,7 @@
if (parent
&& klass_size < parent->klass_size) {
g_warning("camel_type_register: '%s' has smaller class size than parent '%s'", name, parent->name);
- E_UNLOCK(type_lock);
+ TYPE_UNLOCK();
return NULL;
}
@@ -789,7 +789,7 @@
camel_type_class_init(klass, klass);
- E_UNLOCK(type_lock);
+ TYPE_UNLOCK();
return klass;
}
@@ -1254,7 +1254,7 @@
pair_free(pair);
pair = next;
}
- e_mutex_destroy(o->hooks->lock);
+ g_static_rec_mutex_free(&o->hooks->lock);
hooks_free(o->hooks);
o->hooks = NULL;
}
@@ -1273,7 +1273,7 @@
pthread_mutex_lock(&lock);
if (o->hooks == NULL) {
hooks = hooks_alloc();
- hooks->lock = e_mutex_new(E_MUTEX_REC);
+ g_static_rec_mutex_init(&hooks->lock);
hooks->flags = 0;
hooks->depth = 0;
hooks->list_length = 0;
@@ -1283,7 +1283,7 @@
pthread_mutex_unlock(&lock);
}
- e_mutex_lock(o->hooks->lock);
+ g_static_rec_mutex_lock(&o->hooks->lock);
return o->hooks;
}
--- evolution-data-server-1.8.0/camel/camel-provider.c.emutex 2005-11-30 04:54:54.000000000 -0500
+++ evolution-data-server-1.8.0/camel/camel-provider.c 2006-09-14 10:48:11.000000000 -0400
@@ -51,10 +51,10 @@
static GHashTable *module_table;
/* table of CamelProvider's */
static GHashTable *provider_table;
-static EMutex *provider_lock;
+static GStaticRecMutex provider_lock = G_STATIC_REC_MUTEX_INIT;
-#define LOCK() e_mutex_lock(provider_lock);
-#define UNLOCK() e_mutex_unlock(provider_lock);
+#define LOCK() (g_static_rec_mutex_lock(&provider_lock))
+#define UNLOCK() (g_static_rec_mutex_unlock(&provider_lock))
/* The vfolder provider is always available */
static CamelProvider vee_provider = {
@@ -76,7 +76,6 @@
static void
provider_setup(void)
{
- provider_lock = e_mutex_new(E_MUTEX_REC);
module_table = g_hash_table_new(camel_strcase_hash, camel_strcase_equal);
provider_table = g_hash_table_new(camel_strcase_hash, camel_strcase_equal);
--- evolution-data-server-1.8.0/camel/camel-service.c.emutex 2006-01-16 15:12:34.000000000 -0500
+++ evolution-data-server-1.8.0/camel/camel-service.c 2006-09-14 10:48:11.000000000 -0400
@@ -93,8 +93,8 @@
CamelService *service = o;
service->priv = g_malloc0(sizeof(*service->priv));
- service->priv->connect_lock = e_mutex_new(E_MUTEX_REC);
- service->priv->connect_op_lock = e_mutex_new(E_MUTEX_SIMPLE);
+ g_static_rec_mutex_init(&service->priv->connect_lock);
+ g_static_mutex_init(&service->priv->connect_op_lock);
}
static void
@@ -119,8 +119,8 @@
if (service->session)
camel_object_unref (service->session);
- e_mutex_destroy (service->priv->connect_lock);
- e_mutex_destroy (service->priv->connect_op_lock);
+ g_static_rec_mutex_free (&service->priv->connect_lock);
+ g_static_mutex_free (&service->priv->connect_op_lock);
g_free (service->priv);
}
@@ -346,10 +346,10 @@
g_return_val_if_fail (service->session != NULL, FALSE);
g_return_val_if_fail (service->url != NULL, FALSE);
- CAMEL_SERVICE_LOCK (service, connect_lock);
+ CAMEL_SERVICE_REC_LOCK (service, connect_lock);
if (service->status == CAMEL_SERVICE_CONNECTED) {
- CAMEL_SERVICE_UNLOCK (service, connect_lock);
+ CAMEL_SERVICE_REC_UNLOCK (service, connect_lock);
return TRUE;
}
@@ -379,7 +379,7 @@
}
CAMEL_SERVICE_UNLOCK (service, connect_op_lock);
- CAMEL_SERVICE_UNLOCK (service, connect_lock);
+ CAMEL_SERVICE_REC_UNLOCK (service, connect_lock);
return ret;
}
@@ -415,7 +415,7 @@
gboolean res = TRUE;
int unreg = FALSE;
- CAMEL_SERVICE_LOCK (service, connect_lock);
+ CAMEL_SERVICE_REC_LOCK (service, connect_lock);
if (service->status != CAMEL_SERVICE_DISCONNECTED
&& service->status != CAMEL_SERVICE_DISCONNECTING) {
@@ -441,7 +441,7 @@
CAMEL_SERVICE_UNLOCK (service, connect_op_lock);
}
[...1937 lines suppressed...]
}
static void
@@ -193,8 +193,8 @@
camel_folder_change_info_free(p->changed_frozen);
- e_mutex_destroy(p->lock);
- e_mutex_destroy(p->change_lock);
+ g_static_rec_mutex_free(&p->lock);
+ g_static_mutex_free(&p->change_lock);
g_free(p);
}
@@ -267,12 +267,12 @@
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
- CAMEL_FOLDER_LOCK(folder, lock);
+ CAMEL_FOLDER_REC_LOCK(folder, lock);
if (!(folder->folder_flags & CAMEL_FOLDER_HAS_BEEN_DELETED))
CF_CLASS (folder)->sync (folder, expunge, ex);
- CAMEL_FOLDER_UNLOCK(folder, lock);
+ CAMEL_FOLDER_REC_UNLOCK(folder, lock);
}
@@ -529,12 +529,12 @@
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
- CAMEL_FOLDER_LOCK(folder, lock);
+ CAMEL_FOLDER_REC_LOCK(folder, lock);
if (!(folder->folder_flags & CAMEL_FOLDER_HAS_BEEN_DELETED))
CF_CLASS (folder)->expunge (folder, ex);
- CAMEL_FOLDER_UNLOCK(folder, lock);
+ CAMEL_FOLDER_REC_UNLOCK(folder, lock);
}
static int
@@ -643,11 +643,11 @@
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
- CAMEL_FOLDER_LOCK(folder, lock);
+ CAMEL_FOLDER_REC_LOCK(folder, lock);
CF_CLASS (folder)->append_message (folder, message, info, appended_uid, ex);
- CAMEL_FOLDER_UNLOCK(folder, lock);
+ CAMEL_FOLDER_REC_UNLOCK(folder, lock);
}
@@ -1065,11 +1065,11 @@
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
- CAMEL_FOLDER_LOCK(folder, lock);
+ CAMEL_FOLDER_REC_LOCK(folder, lock);
ret = CF_CLASS (folder)->get_message (folder, uid, ex);
- CAMEL_FOLDER_UNLOCK(folder, lock);
+ CAMEL_FOLDER_REC_UNLOCK(folder, lock);
if (ret && camel_debug_start(":folder")) {
printf("CamelFolder:get_message('%s', '%s') =\n", folder->full_name, uid);
@@ -1474,9 +1474,9 @@
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
- CAMEL_FOLDER_LOCK (folder, lock);
+ CAMEL_FOLDER_REC_LOCK (folder, lock);
if (folder->folder_flags & CAMEL_FOLDER_HAS_BEEN_DELETED) {
- CAMEL_FOLDER_UNLOCK (folder, lock);
+ CAMEL_FOLDER_REC_UNLOCK (folder, lock);
return;
}
@@ -1484,7 +1484,7 @@
CF_CLASS (folder)->delete (folder);
- CAMEL_FOLDER_UNLOCK (folder, lock);
+ CAMEL_FOLDER_REC_UNLOCK (folder, lock);
camel_object_trigger_event (folder, "deleted", NULL);
}
--- evolution-data-server-1.8.0/camel/camel-text-index.c.emutex 2006-04-20 04:52:54.000000000 -0400
+++ evolution-data-server-1.8.0/camel/camel-text-index.c 2006-09-14 10:48:12.000000000 -0400
@@ -55,8 +55,10 @@
#define CAMEL_TEXT_INDEX_MAX_WORDLEN (36)
-#define CAMEL_TEXT_INDEX_LOCK(kf, lock) (e_mutex_lock(((CamelTextIndex *)kf)->priv->lock))
-#define CAMEL_TEXT_INDEX_UNLOCK(kf, lock) (e_mutex_unlock(((CamelTextIndex *)kf)->priv->lock))
+#define CAMEL_TEXT_INDEX_LOCK(kf, lock) \
+ (g_static_rec_mutex_lock(&((CamelTextIndex *)kf)->priv->lock))
+#define CAMEL_TEXT_INDEX_UNLOCK(kf, lock) \
+ (g_static_rec_mutex_unlock(&((CamelTextIndex *)kf)->priv->lock))
static int text_index_compress_nosync(CamelIndex *idx);
@@ -125,7 +127,7 @@
int word_cache_count;
EDList word_cache;
GHashTable *words;
- EMutex *lock;
+ GStaticRecMutex lock;
};
/* Root block of text index */
@@ -760,7 +762,7 @@
with moderate memory usage. Doubling the memory usage barely affects performance. */
p->word_cache_limit = 4096; /* 1024 = 128K */
- p->lock = e_mutex_new(E_MUTEX_REC);
+ g_static_rec_mutex_init(&p->lock);
}
static void
@@ -789,7 +791,7 @@
if (p->links)
camel_object_unref((CamelObject *)p->links);
- e_mutex_destroy(p->lock);
+ g_static_rec_mutex_free(&p->lock);
g_free(p);
}
--- evolution-data-server-1.8.0/camel/camel-private.h.emutex 2005-12-08 03:59:32.000000000 -0500
+++ evolution-data-server-1.8.0/camel/camel-private.h 2006-09-14 10:48:11.000000000 -0400
@@ -39,23 +39,31 @@
#include <libedataserver/e-msgport.h>
struct _CamelFolderPrivate {
- EMutex *lock;
- EMutex *change_lock;
+ GStaticRecMutex lock;
+ GStaticMutex change_lock;
/* must require the 'change_lock' to access this */
int frozen;
struct _CamelFolderChangeInfo *changed_frozen; /* queues changed events */
};
-#define CAMEL_FOLDER_LOCK(f, l) (e_mutex_lock(((CamelFolder *)f)->priv->l))
-#define CAMEL_FOLDER_UNLOCK(f, l) (e_mutex_unlock(((CamelFolder *)f)->priv->l))
+#define CAMEL_FOLDER_LOCK(f, l) \
+ (g_static_mutex_lock(&((CamelFolder *)f)->priv->l))
+#define CAMEL_FOLDER_UNLOCK(f, l) \
+ (g_static_mutex_unlock(&((CamelFolder *)f)->priv->l))
+#define CAMEL_FOLDER_REC_LOCK(f, l) \
+ (g_static_rec_mutex_lock(&((CamelFolder *)f)->priv->l))
+#define CAMEL_FOLDER_REC_UNLOCK(f, l) \
+ (g_static_rec_mutex_unlock(&((CamelFolder *)f)->priv->l))
struct _CamelStorePrivate {
- EMutex *folder_lock; /* for locking folder operations */
+ GStaticRecMutex folder_lock; /* for locking folder operations */
};
-#define CAMEL_STORE_LOCK(f, l) (e_mutex_lock(((CamelStore *)f)->priv->l))
-#define CAMEL_STORE_UNLOCK(f, l) (e_mutex_unlock(((CamelStore *)f)->priv->l))
+#define CAMEL_STORE_LOCK(f, l) \
+ (g_static_rec_mutex_lock(&((CamelStore *)f)->priv->l))
+#define CAMEL_STORE_UNLOCK(f, l) \
+ (g_static_rec_mutex_unlock(&((CamelStore *)f)->priv->l))
struct _CamelTransportPrivate {
@@ -67,13 +75,18 @@
struct _CamelServicePrivate {
- EMutex *connect_lock; /* for locking connection operations */
- EMutex *connect_op_lock;/* for locking the connection_op */
+ GStaticRecMutex connect_lock; /* for locking connection operations */
+ GStaticMutex connect_op_lock; /* for locking the connection_op */
};
-#define CAMEL_SERVICE_LOCK(f, l) (e_mutex_lock(((CamelService *)f)->priv->l))
-#define CAMEL_SERVICE_UNLOCK(f, l) (e_mutex_unlock(((CamelService *)f)->priv->l))
-#define CAMEL_SERVICE_ASSERT_LOCKED(f, l) (e_mutex_assert_locked (((CamelService *)f)->priv->l))
+#define CAMEL_SERVICE_LOCK(f, l) \
+ (g_static_mutex_lock(&((CamelService *)f)->priv->l))
+#define CAMEL_SERVICE_UNLOCK(f, l) \
+ (g_static_mutex_unlock(&((CamelService *)f)->priv->l))
+#define CAMEL_SERVICE_REC_LOCK(f, l) \
+ (g_static_rec_mutex_lock(&((CamelService *)f)->priv->l))
+#define CAMEL_SERVICE_REC_UNLOCK(f, l) \
+ (g_static_rec_mutex_unlock(&((CamelService *)f)->priv->l))
struct _CamelSessionPrivate {
evolution-data-server-1.8.1-kill-ethread.patch:
camel-private.h | 2 +-
camel-session.c | 33 ++++++++++++++++++---------------
2 files changed, 19 insertions(+), 16 deletions(-)
--- NEW FILE evolution-data-server-1.8.1-kill-ethread.patch ---
--- evolution-data-server-1.8.1/camel/camel-private.h.ethread 2005-12-08 03:59:32.000000000 -0500
+++ evolution-data-server-1.8.1/camel/camel-private.h 2006-10-14 11:56:09.000000000 -0400
@@ -82,7 +82,7 @@
int thread_id;
GHashTable *thread_active;
- EThread *thread_queue;
+ GThreadPool *thread_pool;
GHashTable *thread_msg_op;
};
--- evolution-data-server-1.8.1/camel/camel-session.c.ethread 2006-01-10 02:56:46.000000000 -0500
+++ evolution-data-server-1.8.1/camel/camel-session.c 2006-10-14 11:56:09.000000000 -0400
@@ -76,17 +76,21 @@
session->priv->thread_lock = g_mutex_new();
session->priv->thread_id = 1;
session->priv->thread_active = g_hash_table_new(NULL, NULL);
- session->priv->thread_queue = NULL;
+ session->priv->thread_pool = NULL;
}
static void
camel_session_finalise (CamelObject *o)
{
CamelSession *session = (CamelSession *)o;
+ GThreadPool *thread_pool = session->priv->thread_pool;
g_hash_table_destroy(session->priv->thread_active);
- if (session->priv->thread_queue)
- e_thread_destroy(session->priv->thread_queue);
+ if (thread_pool) {
+ /* there should be no unprocessed tasks */
+ g_assert(g_thread_pool_unprocessed (thread_pool) == 0);
+ g_thread_pool_free(thread_pool, FALSE, FALSE);
+ }
g_free(session->storage_path);
@@ -515,13 +519,7 @@
g_free(msg);
}
-static void session_thread_destroy(EThread *thread, CamelSessionThreadMsg *msg, CamelSession *session)
-{
- d(printf("destroy message %p session %p\n", msg, session));
- camel_session_thread_msg_free(session, msg);
-}
-
-static void session_thread_received(EThread *thread, CamelSessionThreadMsg *msg, CamelSession *session)
+static void session_thread_proxy(CamelSessionThreadMsg *msg, CamelSession *session)
{
d(printf("receive message %p session %p\n", msg, session));
if (msg->ops->receive) {
@@ -531,22 +529,27 @@
msg->ops->receive(session, msg);
camel_operation_register(oldop);
}
+
+ camel_session_thread_msg_free(session, msg);
}
static int session_thread_queue(CamelSession *session, CamelSessionThreadMsg *msg, int flags)
{
+ GThreadPool *thread_pool;
int id;
CAMEL_SESSION_LOCK(session, thread_lock);
- if (session->priv->thread_queue == NULL) {
- session->priv->thread_queue = e_thread_new(E_THREAD_QUEUE);
- e_thread_set_msg_destroy(session->priv->thread_queue, (EThreadFunc)session_thread_destroy, session);
- e_thread_set_msg_received(session->priv->thread_queue, (EThreadFunc)session_thread_received, session);
+ thread_pool = session->priv->thread_pool;
+ if (thread_pool == NULL) {
+ thread_pool = g_thread_pool_new (
+ (GFunc) session_thread_proxy,
+ session, 1, FALSE, NULL);
+ session->priv->thread_pool = thread_pool;
}
CAMEL_SESSION_UNLOCK(session, thread_lock);
id = msg->id;
- e_thread_put(session->priv->thread_queue, &msg->msg);
+ g_thread_pool_push(thread_pool, msg, NULL);
return id;
}
evolution-data-server-1.9.1-kill-ememory.patch:
camel-folder-search.c | 71 ++++++++++++++------------------
camel-folder-summary.c | 11 ----
camel-folder.c | 21 ++++-----
camel-mime-parser.c | 17 +++----
camel-text-index.c | 10 ++--
camel-vee-folder.c | 4 -
providers/local/camel-maildir-summary.c | 60 ++++-----------------------
7 files changed, 64 insertions(+), 130 deletions(-)
--- NEW FILE evolution-data-server-1.9.1-kill-ememory.patch ---
--- evolution-data-server-1.9.1/camel/camel-text-index.c.kill-ememory 2006-10-25 23:02:26.000000000 -0400
+++ evolution-data-server-1.9.1/camel/camel-text-index.c 2006-10-25 23:03:35.000000000 -0400
@@ -70,7 +70,7 @@
struct _CamelTextIndexNamePrivate {
GString *buffer;
camel_key_t nameid;
- EMemPool *pool;
+ GStringChunk *string_chunk;
};
CamelTextIndexName *camel_text_index_name_new(CamelTextIndex *idx, const char *name, camel_key_t nameid);
@@ -1373,7 +1373,7 @@
struct _CamelTextIndexNamePrivate *p = ((CamelTextIndexName *)idn)->priv;
if (g_hash_table_lookup(idn->words, word) == NULL) {
- char *w = e_mempool_strdup(p->pool, word);
+ char *w = g_string_chunk_insert(p->string_chunk, word);
g_hash_table_insert(idn->words, w, w);
}
@@ -1501,7 +1501,7 @@
p = idn->priv = g_malloc0(sizeof(*idn->priv));
p->buffer = g_string_new("");
- p->pool = e_mempool_new(256, 128, E_MEMPOOL_ALIGN_BYTE);
+ p->string_chunk = g_string_chunk_new(256);
}
static void
@@ -1512,7 +1512,7 @@
g_hash_table_destroy(idn->parent.words);
g_string_free(p->buffer, TRUE);
- e_mempool_destroy(p->pool);
+ g_string_chunk_free(p->string_chunk);
g_free(p);
}
@@ -1544,7 +1544,7 @@
cin->index = (CamelIndex *)idx;
camel_object_ref((CamelObject *)idx);
- cin->name = e_mempool_strdup(p->pool, name);
+ cin->name = g_string_chunk_insert(p->string_chunk, name);
p->nameid = nameid;
return idn;
--- evolution-data-server-1.9.1/camel/camel-mime-parser.c.kill-ememory 2006-04-12 15:14:13.000000000 -0400
+++ evolution-data-server-1.9.1/camel/camel-mime-parser.c 2006-10-25 23:03:35.000000000 -0400
@@ -122,7 +122,7 @@
camel_mime_parser_state_t savestate; /* state at invocation of this part */
#ifdef MEMPOOL
- EMemPool *pool; /* memory pool to keep track of headers/etc at this level */
+ GStringChunk *string_chunk; /* string chunk to keep track of headers/etc at this level */
#endif
struct _camel_header_raw *headers; /* headers for this part */
@@ -1001,7 +1001,8 @@
s->parts = h->parent;
g_free(h->boundary);
#ifdef MEMPOOL
- e_mempool_destroy(h->pool);
+ if (h->string_chunk != NULL)
+ g_string_chunk_free(h->string_chunk);
#else
camel_header_raw_clear(&h->headers);
#endif
@@ -1109,20 +1110,16 @@
content = strchr(header, ':');
if (content) {
register int len;
- n = e_mempool_alloc(h->pool, sizeof(*n));
+ n = g_malloc(sizeof(*n));
n->next = NULL;
len = content-header;
- n->name = e_mempool_alloc(h->pool, len+1);
- memcpy(n->name, header, len);
- n->name[len] = 0;
+ n->name = g_string_chunk_insert_len(h->string_chunk, header, len);
content++;
len = s->outptr - content;
- n->value = e_mempool_alloc(h->pool, len+1);
- memcpy(n->value, content, len);
- n->value[len] = 0;
+ n->value = g_string_chunk_insert_len(h->string_chunk, content, len);
n->offset = offset;
@@ -1180,7 +1177,7 @@
h = g_malloc0(sizeof(*h));
#ifdef MEMPOOL
- h->pool = e_mempool_new(8192, 4096, E_MEMPOOL_ALIGN_STRUCT);
+ h->string_chunk = g_string_chunk_new(8192);
#endif
if (s->parts)
--- evolution-data-server-1.9.1/camel/camel-vee-folder.c.kill-ememory 2006-04-12 15:14:13.000000000 -0400
+++ evolution-data-server-1.9.1/camel/camel-vee-folder.c 2006-10-25 23:03:35.000000000 -0400
@@ -28,10 +28,6 @@
#include "libedataserver/md5-utils.h"
-#if defined (DOEPOOLV) || defined (DOESTRV)
-#include "libedataserver/e-memory.h"
-#endif
-
#include "camel-debug.h"
#include "camel-exception.h"
#include "camel-folder-search.h"
--- evolution-data-server-1.9.1/camel/camel-folder.c.kill-ememory 2006-10-25 23:02:26.000000000 -0400
+++ evolution-data-server-1.9.1/camel/camel-folder.c 2006-10-25 23:03:35.000000000 -0400
@@ -1890,7 +1890,7 @@
struct _CamelFolderChangeInfoPrivate {
GHashTable *uid_stored; /* what we have stored, which array they're in */
GHashTable *uid_source; /* used to create unique lists */
- struct _EMemPool *uid_pool; /* pool used to store copies of uid strings */
+ GStringChunk *uid_string_chunk; /* used to store copies of uid strings */
};
@@ -1917,7 +1917,7 @@
info->priv = g_malloc0(sizeof(*info->priv));
info->priv->uid_stored = g_hash_table_new(g_str_hash, g_str_equal);
info->priv->uid_source = NULL;
- info->priv->uid_pool = e_mempool_new(512, 256, E_MEMPOOL_ALIGN_BYTE);
+ info->priv->uid_string_chunk = g_string_chunk_new(512);
return info;
}
@@ -1943,7 +1943,7 @@
p->uid_source = g_hash_table_new(g_str_hash, g_str_equal);
if (g_hash_table_lookup(p->uid_source, uid) == NULL)
- g_hash_table_insert(p->uid_source, e_mempool_strdup(p->uid_pool, uid), GINT_TO_POINTER (1));
+ g_hash_table_insert(p->uid_source, g_string_chunk_insert(p->uid_string_chunk, uid), GINT_TO_POINTER (1));
}
@@ -1972,7 +1972,7 @@
char *uid = list->pdata[i];
if (g_hash_table_lookup(p->uid_source, uid) == NULL)
- g_hash_table_insert(p->uid_source, e_mempool_strdup(p->uid_pool, uid), GINT_TO_POINTER (1));
+ g_hash_table_insert(p->uid_source, g_string_chunk_insert(p->uid_string_chunk, uid), GINT_TO_POINTER (1));
}
}
@@ -2132,7 +2132,7 @@
return;
}
- olduid = e_mempool_strdup(p->uid_pool, uid);
+ olduid = g_string_chunk_insert(p->uid_string_chunk, uid);
g_ptr_array_add(info->uid_added, olduid);
g_hash_table_insert(p->uid_stored, olduid, info->uid_added);
}
@@ -2166,7 +2166,7 @@
return;
}
- olduid = e_mempool_strdup(p->uid_pool, uid);
+ olduid = g_string_chunk_insert(p->uid_string_chunk, uid);
g_ptr_array_add(info->uid_removed, olduid);
g_hash_table_insert(p->uid_stored, olduid, info->uid_removed);
}
@@ -2195,7 +2195,7 @@
return;
}
- olduid = e_mempool_strdup(p->uid_pool, uid);
+ olduid = g_string_chunk_insert(p->uid_string_chunk, uid);
g_ptr_array_add(info->uid_changed, olduid);
g_hash_table_insert(p->uid_stored, olduid, info->uid_changed);
}
@@ -2221,7 +2221,7 @@
/* always add to recent, but dont let anyone else know */
if (!g_hash_table_lookup_extended(p->uid_stored, uid, (void **)&olduid, (void **)&olduids)) {
- olduid = e_mempool_strdup(p->uid_pool, uid);
+ olduid = g_string_chunk_insert(p->uid_string_chunk, uid);
}
g_ptr_array_add(info->uid_recent, olduid);
}
@@ -2270,7 +2270,8 @@
}
g_hash_table_destroy(p->uid_stored);
p->uid_stored = g_hash_table_new(g_str_hash, g_str_equal);
- e_mempool_flush(p->uid_pool, TRUE);
+ g_string_chunk_free(p->uid_string_chunk);
+ p->uid_string_chunk = g_string_chunk_new(512);
}
@@ -2293,7 +2294,7 @@
g_hash_table_destroy(p->uid_source);
g_hash_table_destroy(p->uid_stored);
- e_mempool_destroy(p->uid_pool);
+ g_string_chunk_free(p->uid_string_chunk);
g_free(p);
g_ptr_array_free(info->uid_added, TRUE);
--- evolution-data-server-1.9.1/camel/camel-folder-summary.c.kill-ememory 2006-07-24 09:40:46.000000000 -0400
+++ evolution-data-server-1.9.1/camel/camel-folder-summary.c 2006-10-25 23:03:35.000000000 -0400
@@ -134,10 +134,6 @@
s->message_info_chunks = NULL;
s->content_info_chunks = NULL;
-#if defined (DOESTRV) || defined (DOEPOOLV)
- s->message_info_strings = CAMEL_MESSAGE_INFO_LAST;
-#endif
-
s->version = CAMEL_FOLDER_SUMMARY_VERSION;
s->flags = 0;
s->time = 0;
@@ -873,13 +869,6 @@
CAMEL_SUMMARY_LOCK(s, summary_lock);
-/* unnecessary for pooled vectors */
-#ifdef DOESTRV
- /* this is vitally important, and also if this is ever modified, then
- the hash table needs to be resynced */
- info->strings = e_strv_pack(info->strings);
-#endif
-
g_ptr_array_add(s->messages, info);
g_hash_table_insert(s->messages_uid, (char *)camel_message_info_uid(info), info);
s->flags |= CAMEL_SUMMARY_DIRTY;
--- evolution-data-server-1.9.1/camel/providers/local/camel-maildir-summary.c.kill-ememory 2005-08-31 00:26:06.000000000 -0400
+++ evolution-data-server-1.9.1/camel/providers/local/camel-maildir-summary.c 2006-10-25 23:03:35.000000000 -0400
@@ -129,10 +129,6 @@
s->message_info_size = sizeof(CamelMaildirMessageInfo);
s->content_info_size = sizeof(CamelMaildirMessageContentInfo);
-#if defined (DOEPOOLV) || defined (DOESTRV)
- s->message_info_strings = CAMEL_MAILDIR_INFO_LAST;
-#endif
-
if (gethostname(hostname, 256) == 0) {
o->priv->hostname = g_strdup(hostname);
} else {
@@ -329,11 +325,9 @@
static void message_info_free(CamelFolderSummary *s, CamelMessageInfo *mi)
{
-#if !defined (DOEPOOLV) && !defined (DOESTRV)
CamelMaildirMessageInfo *mdi = (CamelMaildirMessageInfo *)mi;
g_free(mdi->filename);
-#endif
((CamelFolderSummaryClass *) parent_class)->message_info_free(s, mi);
}
@@ -412,7 +406,7 @@
struct dirent *d;
CamelMaildirSummary *mds = (CamelMaildirSummary *)cls;
char *uid;
- EMemPool *pool;
+ GStringChunk *string_chunk;
int ret;
cur = g_strdup_printf("%s/cur", cls->folder_path);
@@ -429,7 +423,7 @@
}
mds->priv->load_map = g_hash_table_new(g_str_hash, g_str_equal);
- pool = e_mempool_new(1024, 512, E_MEMPOOL_ALIGN_BYTE);
+ string_chunk = g_string_chunk_new(1024);
while ( (d = readdir(dir)) ) {
if (d->d_name[0] == '.')
@@ -438,13 +432,13 @@
/* map the filename -> uid */
uid = strchr(d->d_name, ':');
if (uid) {
- int len = uid-d->d_name;
- uid = e_mempool_alloc(pool, len+1);
- memcpy(uid, d->d_name, len);
- uid[len] = 0;
- g_hash_table_insert(mds->priv->load_map, uid, e_mempool_strdup(pool, d->d_name));
+ char *cp = uid;
+ *cp = '\0';
+ uid = g_string_chunk_insert(string_chunk, uid);
+ *cp = ':';
+ g_hash_table_insert(mds->priv->load_map, uid, g_string_chunk_insert(string_chunk, d->d_name));
} else {
- uid = e_mempool_strdup(pool, d->d_name);
+ uid = g_string_chunk_insert(string_chunk, d->d_name);
g_hash_table_insert(mds->priv->load_map, uid, uid);
}
}
@@ -455,7 +449,7 @@
g_hash_table_destroy(mds->priv->load_map);
mds->priv->load_map = NULL;
- e_mempool_destroy(pool);
+ g_string_chunk_free(string_chunk);
return ret;
}
@@ -621,23 +615,8 @@
filename = camel_maildir_info_filename(mdi);
/* TODO: only store the extension in the mdi->filename struct, not the whole lot */
if (filename == NULL || strcmp(filename, d->d_name) != 0) {
-#ifdef DOESTRV
-#warning "cannot modify the estrv after its been setup, for mt-safe code"
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- /* need to update the summary hash ref */
- g_hash_table_remove(s->messages_uid, camel_message_info_uid(info));
- info->strings = e_strv_set_ref(info->strings, CAMEL_MAILDIR_INFO_FILENAME, d->d_name);
- info->strings = e_strv_pack(info->strings);
- g_hash_table_insert(s->messages_uid, (char *)camel_message_info_uid(info), info);
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-#else
-# ifdef DOEPOOLV
- info->strings = e_poolv_set(info->strings, CAMEL_MAILDIR_INFO_FILENAME, d->d_name, FALSE);
-# else
g_free(mdi->filename);
mdi->filename = g_strdup(d->d_name);
-# endif
-#endif
}
camel_message_info_free(info);
}
@@ -727,9 +706,6 @@
int count, i;
CamelMessageInfo *info;
CamelMaildirMessageInfo *mdi;
-#ifdef DOESTRV
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
-#endif
char *name;
struct stat st;
@@ -775,26 +751,8 @@
/* we'll assume it didn't work, but dont change anything else */
g_free(newname);
} else {
- /* TODO: If this is made mt-safe, then this code could be a problem, since
- the estrv is being modified.
- Sigh, this may mean the maildir name has to be cached another way */
-#ifdef DOESTRV
-#warning "cannot modify the estrv after its been setup, for mt-safe code"
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- /* need to update the summary hash ref */
- g_hash_table_remove(s->messages_uid, camel_message_info_uid(info));
- info->strings = e_strv_set_ref_free(info->strings, CAMEL_MAILDIR_INFO_FILENAME, newname);
- info->strings = e_strv_pack(info->strings);
- g_hash_table_insert(s->messages_uid, (char *)camel_message_info_uid(info), info);
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-#else
-# ifdef DOEPOOLV
- info->strings = e_poolv_set(info->strings, CAMEL_MAILDIR_INFO_FILENAME, newname, TRUE);
-# else
g_free(mdi->filename);
mdi->filename = newname;
-# endif
-#endif
}
g_free(name);
g_free(dest);
--- evolution-data-server-1.9.1/camel/camel-folder-search.c.kill-ememory 2006-06-08 21:21:50.000000000 -0400
+++ evolution-data-server-1.9.1/camel/camel-folder-search.c 2006-10-25 23:03:35.000000000 -0400
@@ -52,7 +52,7 @@
#define r(x)
struct _CamelFolderSearchPrivate {
- GHashTable *mempool_hash;
+ GHashTable *string_chunk_hash;
CamelException *ex;
CamelFolderThread *threads;
@@ -122,23 +122,23 @@
obj->sexp = e_sexp_new();
- /* use a hash of mempools to associate the returned uid lists with
- the backing mempool. yes pretty weird, but i didn't want to change
- the api just yet */
+ /* use a hash of string chunks to associate the returned uid lists
+ * with the backing string chunk. yes pretty weird, but i didn't
+ * want to change the api just yet */
- p->mempool_hash = g_hash_table_new(0, 0);
+ p->string_chunk_hash = g_hash_table_new(0, 0);
}
static void
-free_mempool(void *key, void *value, void *data)
+free_string_chunk (void *key, void *value, void *data)
{
GPtrArray *uids = key;
- EMemPool *pool = value;
+ GStringChunk *string_chunk = value;
g_warning("Search closed with outstanding result unfreed: %p", uids);
g_ptr_array_free(uids, TRUE);
- e_mempool_destroy(pool);
+ g_string_chunk_free(string_chunk);
}
static void
@@ -153,8 +153,8 @@
g_hash_table_destroy(search->summary_hash);
g_free(search->last_search);
- g_hash_table_foreach(p->mempool_hash, free_mempool, obj);
- g_hash_table_destroy(p->mempool_hash);
+ g_hash_table_foreach(p->string_chunk_hash, free_string_chunk, obj);
+ g_hash_table_destroy(p->string_chunk_hash);
g_free(p);
}
@@ -344,7 +344,7 @@
GPtrArray *matches;
int i;
GHashTable *results;
- EMemPool *pool;
+ GStringChunk *string_chunk;
struct _CamelFolderSearchPrivate *p = _PRIVATE(search);
p->ex = ex;
@@ -373,11 +373,7 @@
/* now create a folder summary to return?? */
if (r->type == ESEXP_RES_ARRAY_PTR) {
d(printf("got result ...\n"));
- /* we use a mempool to store the strings, packed in tight as possible, and freed together */
- /* because the strings are often short (like <8 bytes long), we would be wasting appx 50%
- of memory just storing the size tag that malloc assigns us and alignment padding, so this
- gets around that (and is faster to allocate and free as a bonus) */
- pool = e_mempool_new(512, 256, E_MEMPOOL_ALIGN_BYTE);
+ string_chunk = g_string_chunk_new(512);
if (search->summary) {
/* reorder result in summary order */
results = g_hash_table_new(g_str_hash, g_str_equal);
@@ -389,20 +385,21 @@
CamelMessageInfo *info = g_ptr_array_index(search->summary, i);
char *uid = (char *)camel_message_info_uid(info);
if (g_hash_table_lookup(results, uid)) {
- g_ptr_array_add(matches, e_mempool_strdup(pool, uid));
+ g_ptr_array_add(matches, g_string_chunk_insert(string_chunk, uid));
}
}
g_hash_table_destroy(results);
} else {
for (i=0;i<r->value.ptrarray->len;i++) {
d(printf("adding match: %s\n", (char *)g_ptr_array_index(r->value.ptrarray, i)));
- g_ptr_array_add(matches, e_mempool_strdup(pool, g_ptr_array_index(r->value.ptrarray, i)));
+ g_ptr_array_add(matches, g_string_chunk_insert(string_chunk, g_ptr_array_index(r->value.ptrarray, i)));
}
}
- /* instead of putting the mempool_hash in the structure, we keep the api clean by
- putting a reference to it in a hashtable. Lets us do some debugging and catch
- unfree'd results as well. */
- g_hash_table_insert(p->mempool_hash, matches, pool);
+ /* instead of putting the string_chunk_hash in the structure,
+ * we keep the api clean by putting a reference to it in a
+ * hashtable. Lets us do some debugging and catch unfree'd
+ * results as well. */
+ g_hash_table_insert(p->string_chunk_hash, matches, string_chunk);
} else {
g_warning("Search returned an invalid result type");
}
@@ -443,7 +440,7 @@
GPtrArray *matches = NULL, *summary_set;
int i;
GHashTable *results;
- EMemPool *pool;
+ GStringChunk *string_chunk;
struct _CamelFolderSearchPrivate *p = _PRIVATE(search);
g_assert(search->folder);
@@ -495,12 +492,7 @@
/* now create a folder summary to return?? */
if (r->type == ESEXP_RES_ARRAY_PTR) {
d(printf("got result ...\n"));
-
- /* we use a mempool to store the strings, packed in tight as possible, and freed together */
- /* because the strings are often short (like <8 bytes long), we would be wasting appx 50%
- of memory just storing the size tag that malloc assigns us and alignment padding, so this
- gets around that (and is faster to allocate and free as a bonus) */
- pool = e_mempool_new(512, 256, E_MEMPOOL_ALIGN_BYTE);
+ string_chunk = g_string_chunk_new(512);
/* reorder result in summary order */
results = g_hash_table_new(g_str_hash, g_str_equal);
for (i=0;i<r->value.ptrarray->len;i++) {
@@ -512,14 +504,15 @@
CamelMessageInfo *info = g_ptr_array_index(summary_set, i);
char *uid = (char *)camel_message_info_uid(info);
if (g_hash_table_lookup(results, uid))
- g_ptr_array_add(matches, e_mempool_strdup(pool, uid));
+ g_ptr_array_add(matches, g_string_chunk_insert(string_chunk, uid));
}
g_hash_table_destroy(results);
- /* instead of putting the mempool_hash in the structure, we keep the api clean by
- putting a reference to it in a hashtable. Lets us do some debugging and catch
- unfree'd results as well. */
- g_hash_table_insert(p->mempool_hash, matches, pool);
+ /* instead of putting the string_chunk_hash in the structure,
+ * we keep the api clean by putting a reference to it in a
+ * hashtable. Lets us do some debugging and catch unfree'd
+ * results as well. */
+ g_hash_table_insert(p->string_chunk_hash, matches, string_chunk);
} else {
g_warning("Search returned an invalid result type");
}
@@ -552,12 +545,12 @@
{
int i;
struct _CamelFolderSearchPrivate *p = _PRIVATE(search);
- EMemPool *pool;
+ GStringChunk *string_chunk;
- pool = g_hash_table_lookup(p->mempool_hash, result);
- if (pool) {
- e_mempool_destroy(pool);
- g_hash_table_remove(p->mempool_hash, result);
+ string_chunk = g_hash_table_lookup(p->string_chunk_hash, result);
+ if (string_chunk) {
+ g_string_chunk_free(string_chunk);
+ g_hash_table_remove(p->string_chunk_hash, result);
} else {
for (i=0;i<result->len;i++)
g_free(g_ptr_array_index(result, i));
Index: evolution-data-server.spec
===================================================================
RCS file: /cvs/dist/rpms/evolution-data-server/devel/evolution-data-server.spec,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -r1.132 -r1.133
--- evolution-data-server.spec 17 Oct 2006 01:07:09 -0000 1.132
+++ evolution-data-server.spec 27 Oct 2006 20:31:18 -0000 1.133
@@ -32,7 +32,6 @@
URL: http://www.gnome.org/projects/evolution/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Source: %{name}-%{version}.tar.bz2
-Source2: Jerusalem.ics
### Patches ###
@@ -51,14 +50,20 @@
# RH bug #203915
Patch17: evolution-data-server-1.8.0-fix-camel-malloc.patch
+# Gnome.org bug #356177
+Patch18: evolution-data-server-1.8.0-kill-emutex.patch
+
# Gnome.org bug #360240
-Patch18: evolution-data-server-1.8.1-warn-unused-variable.patch
+Patch19: evolution-data-server-1.8.1-warn-unused-variable.patch
# Gnome.org bug #360619
-Patch19: evolution-data-server-1.8.1-warn-incompatible-pointer-type.patch
+Patch20: evolution-data-server-1.8.1-warn-incompatible-pointer-type.patch
# Gnome.org bug #362638
-Patch20: evolution-data-server-1.8.1-ethread.patch
+Patch21: evolution-data-server-1.8.1-kill-ethread.patch
+
+# Gnome.org bug #363965
+Patch22: evolution-data-server-1.9.1-kill-ememory.patch
### Dependencies ###
@@ -136,7 +141,6 @@
%prep
%setup -q
-cp %{SOURCE2} calendar/libical/zoneinfo/Asia
%patch10 -p1 -b .workaround-cal-backend-leak
%patch11 -p1 -b .ldaphack
@@ -145,9 +149,11 @@
%patch14 -p1 -b .no-gnome-common
%patch15 -p1 -b .maybe-fix-crash
%patch17 -p1 -b .fix-camel-malloc
-%patch18 -p1 -b .warn-unused-variable
-%patch19 -p1 -b .warn-incompatible-pointer-type
-%patch20 -p1 -b .ethread
+%patch18 -p1 -b .kill-emutex
+%patch19 -p1 -b .warn-unused-variable
+%patch20 -p1 -b .warn-incompatible-pointer-type
+%patch21 -p1 -b .kill-ethread
+%patch22 -p1 -b .kill-ememory
mkdir -p krb5-fakeprefix/include
mkdir -p krb5-fakeprefix/lib
@@ -367,6 +373,9 @@
%changelog
* Mon Oct 16 2006 Matthew Barnes <mbarnes at redhat.com> - 1.9.1-1.fc7
- Update to 1.9.1
+- Add patch for Gnome.org bug #356177 (deprecate EMutex).
+- Add patch for Gnome.org bug #363695 (deprecate EMemPool, EStrv, EPoolv).
+- Remove Jerusalem.ics timezone file (fixed upstream).
- Remove patch for RH bug #198935 (fixed upstream).
* Mon Oct 16 2006 Matthew Barnes <mbarnes at redhat.com> - 1.8.1-1.fc7
--- Jerusalem.ics DELETED ---
--- evolution-data-server-1.8.1-ethread.patch DELETED ---
More information about the fedora-cvs-commits
mailing list