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