diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-04-14 10:38:31 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-04-14 10:39:47 -0500 |
commit | 15d93ad0b9da5f60afaafe942bd4d05f250318a3 (patch) | |
tree | 6e1596cb9ff2331c94b0c185854159e3b71e7450 /gatchat/gatmux.c | |
parent | 7bbbb6949c03c25e5c19b15a883276228bd96df5 (diff) | |
download | ofono-15d93ad0b9da5f60afaafe942bd4d05f250318a3.tar.bz2 |
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.
Diffstat (limited to 'gatchat/gatmux.c')
-rw-r--r-- | gatchat/gatmux.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; } |