[Spice-devel] [PATCH spice-gtk 1/6] spice-channel: cleanup, get rid of wait_interruptible variable

Hans de Goede hdegoede at redhat.com
Thu Dec 1 07:48:51 PST 2011


The private wait_interruptible channel variable is not used anywhere,
except in one test, which is useless since it never gets set.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 gtk/spice-channel-priv.h |    1 -
 gtk/spice-channel.c      |    9 +--------
 2 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/gtk/spice-channel-priv.h b/gtk/spice-channel-priv.h
index 83e7e25..8aa0e7c 100644
--- a/gtk/spice-channel-priv.h
+++ b/gtk/spice-channel-priv.h
@@ -93,7 +93,6 @@ struct _SpiceChannelPrivate {
     gboolean                    has_error;
     guint                       connect_delayed_id;
 
-    int                         wait_interruptible;
     struct wait_queue           wait;
     guint8                      *xmit_buffer;
     int                         xmit_buffer_capacity;
diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index c9af0ba..7a57630 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -724,14 +724,7 @@ reread:
 
     if (ret == -1) {
         if (cond != 0) {
-            if (c->wait_interruptible) {
-                if (!g_io_wait_interruptible(&c->wait, c->sock, cond)) {
-                    // SPICE_DEBUG("Read blocking interrupted %d", priv->has_error);
-                    return -EAGAIN;
-                }
-            } else {
-                g_io_wait(c->sock, cond);
-            }
+            g_io_wait(c->sock, cond);
             goto reread;
         } else {
             c->has_error = TRUE;
-- 
1.7.7.4



More information about the Spice-devel mailing list