aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/em-camel-stream.c5
-rw-r--r--mail/em-sync-stream.c5
-rw-r--r--mail/mail-session.c3
4 files changed, 17 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 48be3efaa7..98e7655572 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,13 @@
+2007-02-07 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes bug #359979, #384183
+
+ * em-camel-stream.c (sync_op):
+ * em-sync-stream.c (sync_op):
+ * mail-session.c (alert_user):
+ e_msgport_wait()'s behavior is now block-and-pop instead of
+ block-and-peek.
+
2006-09-12 Ushveen Kaur <kushveen@novell.com>
** Fixes bug #353921
diff --git a/mail/em-camel-stream.c b/mail/em-camel-stream.c
index 0dc5617ebd..3821f0a13b 100644
--- a/mail/em-camel-stream.c
+++ b/mail/em-camel-stream.c
@@ -179,6 +179,7 @@ static void
sync_op(EMCamelStream *estream, enum _write_msg_t op, const char *data, size_t n)
{
struct _write_msg msg;
+ EMsg *reply_msg;
d(printf("%p: launching sync op %d\n", estream, op));
/* we do everything synchronous, we should never have any locks, and
@@ -188,8 +189,8 @@ sync_op(EMCamelStream *estream, enum _write_msg_t op, const char *data, size_t n
msg.data = data;
msg.n = n;
e_msgport_put(estream->data_port, &msg.msg);
- e_msgport_wait(estream->reply_port);
- g_assert(e_msgport_get(msg.msg.reply_port) == &msg.msg);
+ reply_msg = e_msgport_wait(estream->reply_port);
+ g_assert(reply_msg == &msg.msg);
d(printf("%p: returned sync op %d\n", estream, op));
}
diff --git a/mail/em-sync-stream.c b/mail/em-sync-stream.c
index d6654985c0..26201ea7e9 100644
--- a/mail/em-sync-stream.c
+++ b/mail/em-sync-stream.c
@@ -214,6 +214,7 @@ sync_op(EMSyncStream *emss, enum _write_msg_t op, const char *data, size_t n)
{
struct _EMSyncStreamPrivate *p = emss->priv;
struct _write_msg msg;
+ EMsg *reply_msg;
d(printf("%p: launching sync op %d\n", emss, op));
@@ -226,9 +227,9 @@ sync_op(EMSyncStream *emss, enum _write_msg_t op, const char *data, size_t n)
msg.n = n;
e_msgport_put(p->data_port, &msg.msg);
- e_msgport_wait(p->reply_port);
+ reply_msg = e_msgport_wait(p->reply_port);
+ g_assert(reply_msg == &msg.msg);
- g_assert(e_msgport_get(msg.msg.reply_port) == &msg.msg);
d(printf("%p: returned sync op %d\n", emss, op));
}
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 6b4bdf610f..9b69f53643 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -395,8 +395,7 @@ alert_user(CamelSession *session, CamelSessionAlertType type, const char *prompt
}
if (cancel) {
- e_msgport_wait(user_message_reply);
- r = (struct _user_message_msg *)e_msgport_get(user_message_reply);
+ r = (struct _user_message_msg *)e_msgport_wait(user_message_reply);
g_assert(m == r);
ret = m->result;