From 15d93ad0b9da5f60afaafe942bd4d05f250318a3 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 14 Apr 2010 10:38:31 -0500 Subject: [PATCH] Fix: GAtMux channels should return EAGAIN GAtChat uses non-blocking semantics, so the GAtMux channels should return the EAGAIN status to make GAtChat work properly. --- gatchat/gatmux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gatchat/gatmux.c b/gatchat/gatmux.c index b70f6a0d..139edd2e 100644 --- a/gatchat/gatmux.c +++ b/gatchat/gatmux.c @@ -433,6 +433,9 @@ static GIOStatus channel_read(GIOChannel *channel, gchar *buf, gsize count, *bytes_read = ring_buffer_read(mux_channel->buffer, buf, avail); + if (*bytes_read == 0) + return G_IO_STATUS_AGAIN; + return G_IO_STATUS_NORMAL; }