13956N/A--- gqview-2.0.4/src/remote.c.orig 2008-08-20 17:41:56.656014000 +0800
13956N/A+++ gqview-2.0.4/src/remote.c 2008-08-20 18:00:55.127044000 +0800
13956N/A@@ -43,6 +43,7 @@
13956N/A {
13956N/A RemoteClient *client = data;
13956N/A RemoteConnection *rc;
13956N/A+ GIOStatus status;
13956N/A
13956N/A rc = client->rc;
13956N/A
13956N/A@@ -54,7 +55,7 @@
13956N/A GError *error = NULL;
13956N/A guint termpos;
13956N/A
13956N/A- while (g_io_channel_read_line(source, &buffer, NULL, &termpos, &error) == G_IO_STATUS_NORMAL)
13956N/A+ while ((status = g_io_channel_read_line(source, &buffer, NULL, &termpos, &error)) == G_IO_STATUS_NORMAL)
13956N/A {
13956N/A if (buffer)
13956N/A {
13956N/A@@ -71,7 +72,16 @@
13956N/A
13956N/A buffer = NULL;
13956N/A }
13956N/A+
13956N/A }
13956N/A+ if (status == G_IO_STATUS_EOF)
13956N/A+ {
13956N/A+ rc->clients = g_list_remove(rc->clients, client);
13956N/A+ g_source_remove(client->channel_id);
13956N/A+ close(client->fd);
13956N/A+ g_free(client);
13956N/A+ return TRUE;
13956N/A+ }
13956N/A
13956N/A if (error)
13956N/A {