Index: libedataserver/e-msgport.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-msgport.c,v
retrieving revision 1.10
diff -u -p -r1.10 e-msgport.c
--- libedataserver/e-msgport.c	26 Jul 2006 18:12:08 -0000	1.10
+++ libedataserver/e-msgport.c	5 Oct 2006 14:55:47 -0000
@@ -1022,31 +1022,17 @@ thread_dispatch(void *din)
 		if (m == NULL) {
 			/* nothing to do?  If we are a 'new' type thread, just quit.
 			   Otherwise, go into waiting (can be cancelled here) */
-			info = NULL;
-			switch (e->type) {
-			case E_THREAD_NEW:
-			case E_THREAD_QUEUE:
-			case E_THREAD_DROP:
-				info = thread_find(e, self);
-				if (info)
-					info->busy = FALSE;
-				e->waiting++;
-				pthread_mutex_unlock(&e->mutex);
-				e_msgport_wait(e->server_port);
-				pthread_mutex_lock(&e->mutex);
-				e->waiting--;
-				pthread_mutex_unlock(&e->mutex);
-				break;
-#if 0
-			case E_THREAD_NEW:
-				e->id_list = g_list_remove(e->id_list, (void *)pthread_self());
-				pthread_mutex_unlock(&e->mutex);
-				return 0;
-#endif
-			}
+			info = thread_find(e, self);
+			if (info)
+				info->busy = FALSE;
+			e->waiting++;
+			pthread_mutex_unlock(&e->mutex);
+			m = e_msgport_wait(e->server_port);
+			pthread_mutex_lock(&e->mutex);
+			e->waiting--;
+		}
 
-			continue;
-		} else if (m->reply_port == E_THREAD_QUIT_REPLYPORT) {
+		if (m->reply_port == E_THREAD_QUIT_REPLYPORT) {
 			t(printf("Thread %" G_GUINT64_FORMAT " got quit message\n", e_util_pthread_id(self)));
 			/* Handle a quit message, say we're quitting, free the message, and break out of the loop */
 			info = thread_find(e, self);
@@ -1344,7 +1330,6 @@ void *server(void *data)
 	while (1) {
 		printf("server %d: waiting\n", id);
 		msg = e_msgport_wait(server_port);
-		msg = e_msgport_get(server_port);
 		if (msg) {
 			printf("server %d: got message\n", id);
 			g_usleep(1000000);
@@ -1372,7 +1357,6 @@ void *client(void *data)
 		e_msgport_put(server_port, msg);
 		printf("client: waiting for reply\n");
 		e_msgport_wait(replyport);
-		e_msgport_get(replyport);
 		printf("client: got reply\n");
 	}
 
@@ -1388,8 +1372,7 @@ void *client(void *data)
 
 	printf("client: receiving multiple\n");
 	for (i=0;i<10;i++) {
-		e_msgport_wait(replyport);
-		msg = e_msgport_get(replyport);
+		msg = e_msgport_wait(replyport);
 		g_free(msg);
 	}
 
Index: libedataserverui/e-passwords.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserverui/e-passwords.c,v
retrieving revision 1.35
diff -u -p -r1.35 e-passwords.c
--- libedataserverui/e-passwords.c	17 Aug 2006 09:44:48 -0000	1.35
+++ libedataserverui/e-passwords.c	5 Oct 2006 14:55:48 -0000
@@ -186,8 +186,8 @@ ep_msg_send(EPassMsg *msg)
 			g_main_context_iteration(NULL, TRUE);
 		g_assert(m == msg);
 	} else {
-		e_msgport_wait(msg->msg.reply_port);
-		g_assert(e_msgport_get(msg->msg.reply_port) == &msg->msg);
+		EMsg *reply_msg = e_msgport_wait(msg->msg.reply_port);
+		g_assert(reply_msg == &msg->msg);
 	}
 }
 
