aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-sync-stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-sync-stream.c')
-rw-r--r--mail/em-sync-stream.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mail/em-sync-stream.c b/mail/em-sync-stream.c
index d6fae3a8d7..2b18f782d9 100644
--- a/mail/em-sync-stream.c
+++ b/mail/em-sync-stream.c
@@ -263,7 +263,7 @@ stream_write (CamelStream *stream, const char *buffer, size_t n)
if (emss->cancel)
return -1;
- if (pthread_self() == mail_gui_thread) {
+ if (pthread_equal(pthread_self(), mail_gui_thread)) {
EMSS_CLASS(emss)->sync_write(stream, buffer, n);
#ifdef LOG_STREAM
if (p->logfd)
@@ -293,7 +293,7 @@ stream_flush(CamelStream *stream)
if (emss->cancel)
return -1;
- if (pthread_self() == mail_gui_thread)
+ if (pthread_equal(pthread_self(), mail_gui_thread))
return ((EMSyncStreamClass *)(((CamelObject *)emss)->klass))->sync_flush(stream);
else
sync_op(emss, EMSS_FLUSH, NULL, 0);
@@ -311,7 +311,7 @@ stream_close(CamelStream *stream)
d(printf("%p: closing stream\n", stream));
- if (pthread_self() == mail_gui_thread) {
+ if (pthread_equal(pthread_self(), mail_gui_thread)) {
#ifdef LOG_STREAM
if (emss->priv->logfd) {
fclose(emss->priv->logfd);