diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-01-20 21:34:32 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-01-20 21:34:32 +0000 |
commit | ee0d353d9dc1b7ea330312bd644c5d3012e211d0 (patch) | |
tree | 90da3a26278463bdcaa0a98994f87d97aa28b038 /daemon/echo.c | |
parent | 79169bd1c7f9b311a20fe25324c974633c7d7876 (diff) |
Don't call unref in IO handling function
Diffstat (limited to 'daemon/echo.c')
-rw-r--r-- | daemon/echo.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/daemon/echo.c b/daemon/echo.c index 34b38737..91fd4ab3 100644 --- a/daemon/echo.c +++ b/daemon/echo.c @@ -51,10 +51,8 @@ static gboolean session_event(GIOChannel *chan, GIOCondition cond, gpointer data gsize len, written; GIOError err; - if (cond & (G_IO_HUP | G_IO_ERR)) { - g_io_channel_unref(chan); + if (cond & (G_IO_HUP | G_IO_ERR)) return FALSE; - } err = g_io_channel_read(chan, (gchar *) buf, sizeof(buf), &len); if (err == G_IO_ERROR_AGAIN) |