--- evolution-data-server-1.8.0/libedataserver/e-msgport.c.msgport	2007-01-10 14:54:21.000000000 +0100
+++ evolution-data-server-1.8.0/libedataserver/e-msgport.c	2007-01-10 14:56:06.000000000 +0100
@@ -487,7 +487,7 @@
 
 struct _EMsgPort {
 	GAsyncQueue *queue;
-	EMsg *cache;
+	GSList *cache;
 	gint pipe[2];  /* on Win32, actually a pair of SOCKETs */
 #ifdef HAVE_NSS
 	PRFileDesc *prpipe[2];
@@ -685,7 +685,7 @@
 
 	/* check the cache first */
 	if (msgport->cache != NULL) {
-		msg = msgport->cache;
+		msg = msgport->cache->data;
 		/* don't clear the cache */
 		g_async_queue_unlock (msgport->queue);
 		return msg;
@@ -697,7 +697,7 @@
 
 	/* The message is not actually "removed" from the EMsgPort until
  	 * e_msgport_get() is called.  So we cache the popped message. */
-	msgport->cache = msg;
+	msgport->cache = g_slist_append (msgport->cache, msg);
 
 	if (msg->flags & MSG_FLAG_SYNC_WITH_PIPE)
 		msgport_sync_with_pipe (msgport->pipe[0]);
@@ -722,8 +722,8 @@
 
 	/* check the cache first */
 	if (msgport->cache != NULL) {
-		msg = msgport->cache;
-		msgport->cache = NULL;
+		msg = msgport->cache->data;
+		msgport->cache = g_slist_delete_link (msgport->cache, msgport->cache);
 		g_async_queue_unlock (msgport->queue);
 		return msg;
 	}
